During the shutdown of a Spring AMQP listener container, all retrieved messages are allowed to finish processing before the container stops.
I would like the same behavior for the JMS listener containers. As of now, we cannot control whether a received message should be fully processed before the container shuts down. This means that messages received during shutdown will not be acknowledged when using AUTO_ACKNOWLEDGE, and they will therefore be redelivered or moved to the backout/dead-letter queue.
Current behavior; https://github.com/spring-projects/spring-framework/blob/3b90311c17a60f528615dd5f8944a0e9e308292a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java#L725
Comment From: jhoeller
Have you tried setting the acceptMessagesWhileStopping property to true?
Comment From: NicklasWallgren
Have you tried setting the
acceptMessagesWhileStoppingproperty totrue?
Thanks, that might be a viable option.
Comment From: jhoeller
Closing this under the assumption that acceptMessagesWhileStopping is sufficient as an option.