[rabbitmq-discuss] Transactions and duplicate

lepolac lepolac at gmail.com
Wed Mar 26 15:12:37 GMT 2014


Hello,

When using transactions on the consumer side, I noticed duplicates when a
node is failing.
This occurs when the node the consumer is connected to fails, or if the
master fails.
It occurs both when catching the consumer cancellation exception and
reconnecting directly, or using a simpler client and restarting it.
I used a tx channel with basic.get and no autoack, I manually ack() and
commit() every message.

Whilst I can understand redelivery/dups when using asynchronous ways of
consuming, I fail to see why it happens when using synchronous calls.

I can reproduce this everytime, I always get one message redelivered, even
if the commit() called return.
I noticed that when throttling the consumer (let's say one message consumed
every 100ms), I don't get dups.

So, is the commit() call really synchronous ?
Generally, what would be the best way to avoid duplicates ? I tried
basicAck() without transactions and got the same results, I get dups.

I'm using 3.2.4 and the java client.
There's about 1ms latency between rabbit nodes and my client.

Thanks



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/Transactions-and-duplicate-tp34344.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list