The use of x-delivery-count, x-acquired-count and delivery limit

36 views
Skip to first unread message

Gary

unread,
Jul 29, 2026, 5:38:47 PM (13 days ago) Jul 29
to rabbitmq-users
Using Version 4.3.2 I've configured a quorum queue with a consumer timeout,  delivery limit and a delayed retry. Errors are handled as I expect with messages being re-queued with a delay.

A problem arises for me with trying to dead-letter messages should X number of attempts (attempts in my context is processing of the message) be made. According to the docs when is delivery count incremented? not all failures will increment the 'delivery-count', specifically consumer timeouts.

This is important for my application because I can only configure dead-lettering based on the 'delivery-count' (unless I am mistaken), but I want to be able to dead letter a message following any failure.

Is there a way around this and I'm not sure why/what the ultimate difference is between x-delivery-count and x-acquired-count is and why I cannot dead-letter based on the acquired-count.?

Gary

Karl Nilsson

unread,
Jul 30, 2026, 5:22:34 AM (12 days ago) Jul 30
to rabbitm...@googlegroups.com
Hi Gary,

We've discussed it internally and we can't recall what the reasoning was for not updating the delivery-count when a consumer timeout triggers. Intuitively I feel it should. We will look at changing this for RabbitMQ 4.4.

delivery-count is meant to track any failed deliveries - what can be reliably observed by the broker as a failure isn't always 100% clear. Acquired-count just tracks any message acquisition, i.e. assignment to a consumer irrespective of whether it was returned deliberately or as part of a potential processing failure.

Cheers


Karl Nilsson

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rabbitmq-users/31907682-f036-4c11-a014-289cd22bd1acn%40googlegroups.com.

Gary

unread,
Jul 30, 2026, 12:22:26 PM (12 days ago) Jul 30
to rabbitmq-users
Thanks for your response Karl and I appreciate this being looked at.

Given that effort was spent documenting that a consumer-timeout won't increment the delivery count I would hazard a guess there was a good reason for it (obviously I'm no expert nor am I trying to tell you how to do your job of course!). It could  also be that other users rely on the current behaviour. What if dead-lettering could be also based on the acquired count, would that be a 'safer' change?

Regards
Gary

Reply all
Reply to author
Forward
0 new messages