You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ishitori <Is...@bk.ru> on 2011/06/28 16:20:05 UTC

Re: Unacknowledged message is not redelivered

I experience the same problem with redelivery with Individual acknowledgement
mode. I've looked at the example, but every test case uses
Session.AUTO_ACKNOWLEDGE. It raises 2 questions:

1. So, why should Individual acknowledgement mode be used?
2. I don't see where transaction is started... Does it means that
AUTO_ACKNOWLEDGE starts transaction in the background?

--
View this message in context: http://activemq.2283324.n4.nabble.com/Unacknowledged-message-is-not-redelivered-tp2361981p3630484.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Unacknowledged message is not redelivered

Posted by Torsten Mielke <to...@fusesource.com>.
> 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