polishing

This commit adds an explicit error message when the BackOff instance
has returned BackOffExecution#STOP which basically means that no
further attempts are allowed.

This error message is a convenience way to notify that the container is
about to be shut down.

Issue: SPR-11746
This commit is contained in:
Stephane Nicoll
2014-05-13 14:44:14 +02:00
parent 2750ab6734
commit 04e6575db6

View File

@@ -928,6 +928,11 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
}
}
if (!applyBackOffTime(execution)) {
StringBuilder msg = new StringBuilder();
msg.append("Stopping container for destination '")
.append(getDestinationDescription())
.append("' - back off policy does not allow ").append("for further attempts.");
logger.error(msg.toString());
stop();
}
}