posted 12 years ago
Yes the producers set the acknowledgement of the messages which is then used by the consumers and JMS server.
Message acknowledgement tells you what you consider a message successfully received and processed to be then removed from the JMS server.
In auto acknowledgement if the consumer onMessage() method completes without error the message is considered received and processed successfully, it'll be then removed from the JMS server.
In manual acknowledgement, the consumer has to make a method call to say "OK I have done successfully my work with the message". However even without technical error the consumer can choose
not to acknowledge the message because for example some business conditions were not met to process the message. In that case the onMessage() completes without error but the message says in the JMS server.