You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Torsten Mielke <to...@fusesource.com> on 2011/07/04 11:46:21 UTC

Re: Unacknowledged message is not redelivered

> 1. So, why should Individual acknowledgement mode be used?

With individual ack mode you still need to ack *each* msg eventually. 
Not acking the msgs does not mean the broker will replay it. 
Only when acked, will the broker assume the msg got consumed and delete it on its end.
There is no rollback or reject concept with individual ack mode. 
If you need to rollback a msg, transactions should be used.

However if the consumer dies before it has acked a msg, the broker will 
redeliver any unacked msgs. 
 


> 2. I don't see where transaction is started... Does it means that
> AUTO_ACKNOWLEDGE starts transaction in the background?


No, transactions are turned off by default. If you want to use local JMS 
transactions, set the transacted argument to true in your call to 
JMSConnection.createSession(boolean transacted, int acknowledgeMode);

The acknowledgeMode argument is ignored when transacted=true.



Torsten Mielke
FuseSource.com
tmielke.blogspot.com