INT-3232: RedisQMDE: Polish Log Exceptions
JIRA: https://jira.springsource.org/browse/INT-3232 Previously, in the `RedisQueueMessageDrivenEndpoint` all `Exceptions` on `rightPop` operation were logged with `error` level independently of the state of the Endpoint. Add `if...else` and log with `debug`, if the Endpoint isn't active and don't publish the event.
This commit is contained in:
committed by
Gary Russell
parent
52f5f4ad77
commit
2df3406c88
@@ -178,10 +178,15 @@ public class RedisQueueMessageDrivenEndpoint extends MessageProducerSupport impl
|
||||
value = this.boundListOperations.rightPop(this.receiveTimeout, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error("Failed to execute listening task. Will attempt to resubmit in " + this.recoveryInterval + " milliseconds.", e);
|
||||
this.listening = false;
|
||||
this.sleepBeforeRecoveryAttempt();
|
||||
this.publishException(e);
|
||||
if (this.active) {
|
||||
logger.error("Failed to execute listening task. Will attempt to resubmit in " + this.recoveryInterval + " milliseconds.", e);
|
||||
this.publishException(e);
|
||||
this.sleepBeforeRecoveryAttempt();
|
||||
}
|
||||
else {
|
||||
logger.debug("Failed to execute listening task. " + e.getClass() + ": " + e.getMessage());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user