activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: Unacknowledged message is not redelivered
Date Mon, 04 Jul 2011 09:46:21 GMT
> 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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message