Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jendakol committed Dec 19, 2018
2 parents f5c6e17 + f374e54 commit 243aa8c
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,16 +523,18 @@ private[rabbitmq] object DefaultRabbitMQClientFactory extends LazyLogging {
val timedOutAction = if (processTimeout == Duration.ZERO) {
action
} else {
action.timeout(ScalaDuration(processTimeout.toMillis, TimeUnit.MILLISECONDS))
action
.timeout(ScalaDuration(processTimeout.toMillis, TimeUnit.MILLISECONDS))
.onErrorRecoverWith {
case e: TimeoutException =>
timeoutsMeter.mark()
logger.warn(s"[$name] Task timed-out, applying DeliveryResult.${consumerConfig.timeoutAction}", e)
Task.now(consumerConfig.timeoutAction)
}
}

timedOutAction
.onErrorRecoverWith {
case e: TimeoutException =>
timeoutsMeter.mark()
logger.warn(s"[$name] Task timed-out, applying DeliveryResult.${consumerConfig.timeoutAction}", e)
Task.now(consumerConfig.timeoutAction)

case NonFatal(e) =>
fatalFailuresMeter.mark()
logger.warn(s"[$name] Error while executing callback, applying DeliveryResult.${consumerConfig.failureAction}", e)
Expand Down

0 comments on commit 243aa8c

Please sign in to comment.