Arnaud Simon wrote:
>
>
> The JMS spec says:
> "When a client uses the AUTO_ACKNOWLEDGE mode, it is not in direct
> control of message acknowledgment. Since such clients cannot know for
> certain if a particular message has been acknowledged, they must be
> prepared for redelivery of the last consumed message. This can be caused
> by the client completing its work just prior to a failure that prevents
> the message acknowledgment from occurring. Only a session’s last
> consumed message is subject to this ambiguity"
>
> That makes me think that we may not need to sync.
>
I believe that passage is really referring to the "weird" jms inconsistency
where the the message is not acked until after onMessage() has finished
executing in the case of a MesssageListener with AUTO_ACKNOWLEDGE.
But even if it also applies to receive(), then to ensure this statement:
"Only a session’s last
consumed message is subject to this ambiguity"
You would still have to ack synchronously in order to guarantee that only
the last message might get redelivered. If you acked async you might get N
messages redelivered where N can be > 1, depending on how long it takes for
the async ack to get to the server and the rate of consumption.
Interesting discussion though.
--
View this message in context:
http://www.nabble.com/JMS-Acknowledgements-sent-asynchronously--tp17519565p17651888.html
Sent from the Qpid Developers mailing list archive at Nabble.com.