[rabbitmq-discuss] A weird case of "PRECONDITION_FAILED - unknown delivery tag"

Emile Joubert emile at rabbitmq.com
Wed Aug 28 14:21:18 BST 2013


Hi,

On 28/08/13 13:30, Razvan Dinu wrote:

> it's usually because of double ack-ing, ack-ing on wrong channels or
> ack-ing messages that should not be ack-ed. I've checked at least a
> dozen times, and it doesn't seem to be the case for me.

A good way to verify that claim independently from the client code is to
connect to the broker via the Tracer:

http://www.rabbitmq.com/javadoc/com/rabbitmq/tools/Tracer.html

The protocol trace will show whether messages are being acknowledged
correctly.

> I think it has something to do with ACK-ing from one thread using the
> same channel that is used for listening on another thread.

If you use multiple threads to access the same channel then you must
make sure they are synchronised. A better solution is to provide each
thread with its own channel.

> it's because I need the worker to be able to take a peak at some of
> the tasks in the queues.

Can the criteria being peeked at be placed in a header or the routing
key instead? Try to route those messages differently and avoid the need
for peeking.




-Emile




More information about the rabbitmq-discuss mailing list