If you have auto-acknowledgement enabled, the client acks every message received automatically.
If you use onMessage() to process your messages, the ACK is send on returning from onMessage(). So if you do all your processing inside onMessage(), the single ACK will be send after each processing step.
On the other hand, if you use receive(), then the ACK has been already sent if receive() has returned.
Since I do not know the internal implementation of the JBoss IL very well, this is not the full story.
Hope that helps a bit, Jörg
Thank you very much.
it is very helpful.
I still have one question.
I winder what is purpose to use CLIENT_ACKNOWLEDGE.
Because using auto_ack is simple and fast.
Why to use CLIENT_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE.
Thank you. it is really useful.