We have a Spring JMS message listener container for asynchronously receiving messages. Using DefaultMessageListenerContainer and in sessionTransacted mode. I understand that in sessionTransacted mode, in case of an exception, the message will be returned to the queue. But how can I make sure that the message will not be removed from the queue, even if the receiver (which selected the message) works or just runs a computer that is losing power?
At first I thought that the CLIENT_ACKNOWLEDGE confirmation mode should save me, but obviously this is not so, Spring calls .acknowledge () no question what.
So, here is my question, how can I guarantee delivery? Using a custom MessageListenerContainer? Using transaction manager?
source
share