Can anyone please explain me what is the impact of Session.AUTO_ACKNOWLEDGE for ActiveMQ JMS configurations
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
I believe by default ActiveMQ is set to auto acknowledge messages. This just means that when a message arrives it will automatically acknowledge that the message arrived. It is the same thing as calling .acknowledge() from the JMS object.
One reason to turn auto-acknowledge off is if you built a server and lets say you are processing each JMS Message and are doing some sort of DB transaction. If the transaction fails you would want the JMS message to be re-sent so you can fix your error and process it again. So in this sense you would only acknowledge the JMS object only after processing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With