Skip to content

Commit

Permalink
feat: add silent option
Browse files Browse the repository at this point in the history
  • Loading branch information
jigarkhwar committed May 9, 2024
1 parent f130728 commit be313b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class KafkaRequestReplyAction[K: ClassTag, V: ClassTag](
session,
next,
requestNameString,
attributes.silent.getOrElse(false)
attributes.silent.getOrElse(false),
)
},
e => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class KafkaMessageTracker(actor: ActorRef) {
session: Session,
next: Action,
requestName: String,
silentRequest: Boolean
silentRequest: Boolean,
): Unit =
actor ! MessagePublished(
matchId,
Expand All @@ -26,6 +26,6 @@ class KafkaMessageTracker(actor: ActorRef) {
session,
next,
requestName,
silentRequest
silentRequest,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object KafkaMessageTrackerActor {
session: Session,
next: Action,
requestName: String,
silentRequest: Boolean
silentRequest: Boolean,
)

case class MessageConsumed(
Expand Down Expand Up @@ -71,9 +71,9 @@ class KafkaMessageTrackerActor(statsEngine: StatsEngine, clock: Clock) extends A
requestName: String,
responseCode: Option[String],
message: Option[String],
silentRequest: Boolean
silentRequest: Boolean,
): Unit = {
if(! silentRequest) {
if (!silentRequest) {
statsEngine.logResponse(
session.scenario,
session.groups,
Expand Down Expand Up @@ -112,7 +112,7 @@ class KafkaMessageTrackerActor(statsEngine: StatsEngine, clock: Clock) extends A
requestName,
message.responseCode,
Some(errorMessage),
silentRequest
silentRequest,
)
case _ =>
executeNext(newSession, sent, received, OK, next, requestName, None, None, silentRequest)
Expand Down Expand Up @@ -159,7 +159,7 @@ class KafkaMessageTrackerActor(statsEngine: StatsEngine, clock: Clock) extends A
requestName,
None,
Some(s"Reply timeout after $receivedTimeout ms"),
silentRequest
silentRequest,
)
}
timedOutMessages.clear()
Expand Down

0 comments on commit be313b8

Please sign in to comment.