Javadoc for org.springframework.jms.listener.AbstractMessageListenerContainer
states, that if
\"sessionAcknowledgeMode\" set to \"CLIENT_
It depends on which listener container you use; when using AUTO ack mode, the SimpleMessageListenerContainer
acks after the listener returns (i.e. a traditional JMS MessageListener
). The DefaultMessageListenerContainer
acks before the listener is invoked, so you need acknowledgeMode="transacted"
to prevent message loss.
The javadocs in this area were a bit misleading and have been improved recently.
With CLIENT_ACKNOWLEDGE, you're on your own to do the acks. That doc just means you are at the whim of the broker. According to the JMS message javadoc:
Messages that have been received but not acknowledged may be redelivered
In my experience it is best to use auto ack with an SMLC
and transactions with DMLC
.