[rabbitmq-discuss] Vanishing of persistent messages on durable, auto-deleting queue with dead-lettering
matthias at rabbitmq.com
Sun Jul 1 19:23:14 BST 2012
On 29/06/12 17:27, Ernest Staszuk wrote:
> After disconnecting a client from durable, auto-deleting queue with
> dead-lettering-exchange I would expect passing all messages to dead
> letter exchange and then deleting queue. But surprisingly for me
> queue was deleted and messages just vanished into limbo.
That's the defined behaviour. From
A message is dead-lettered when any of the following events occur:
- The message is rejected (basic.reject or basic.nack) with
- The TTL for the message expires.
> Is this behavior desirable? Why?
We deliberately kept the set of operations susceptible to dead-lettering
small, to avoid unintended consequences. It is possible that actions
like auto-deletion, queue lease expiry, explicit deletion and purging
should all trigger the dead-letter mechanism, but I'd like to see
compelling use cases first before making such a change.
> How should I get around this problem? I thought about declare queue
> as non auto deleting and making own monitoring daemon, which could
> handle cleaning queues without consumers. Is there any simpler way of
> achieve my goal?
Perhaps a combination of queue leases and ttl would work. The former has
the additional advantage of allowing the system to mask temporary
consumer and connectivity failures.
More information about the rabbitmq-discuss