[rabbitmq-discuss] Transactions and duplicate

Matthias Radestock matthias at rabbitmq.com
Thu Mar 27 21:49:29 GMT 2014

On 27/03/14 21:14, Simon MacMullen wrote:
  > But if you are consuming (it was not very clear from your original mail
> whether you were using basic.consume or basic.get) then subsequent
> messages can be duplicated.

The OP said "I used a tx channel with basic.get and no autoack, I 
manually ack() and commit() every message."

Unlike publishes, acks do not have a corresponding confirmation. Not in 
the protocol, and, more importantly, not internally within the server. 
In a transaction context, the receipt of a commit-ok by a client 
therefore only indicates that the server has seen the acks, not that it 
has processed them, let alone persisted the information to disk.

We may want to make that clear in http://www.rabbitmq.com/semantics.html#tx

Duplicates are unavoidable in general, i.e. even if the tx guarantees 
were stronger there would still be plenty of failure scenarios that 
result in duplicates. Apps need to be able to cope with that.


More information about the rabbitmq-discuss mailing list