[rabbitmq-discuss] Exclusive queues and mirroring
matthias at rabbitmq.com
Sat Mar 8 22:12:28 GMT 2014
On 08/03/14 00:21, Jonathan Holland wrote:
> We have a scenario where we want to use queue mirroring in a cluster,
> but have the queues auto-delete when the last consumer disconnects.
> When we have a mirrored policy enabled, and the queue is not exclusive
> or autodelete, then I see it properly mirroring to a slave node.
> When we enable exclusive and autodelete, the queue no longer mirrors.
What do you mean by "no longer mirrors"?
You are aware of the semantics of exclusive and auto-delete, right?
"Exclusive queues are deleted when that connection [which created the
"the queue is deleted when all consumers have finished using it. The
last consumer can be cancelled either explicitly or because its channel
Both exclusive and auto-delete are entirely orthogonal to mirroring,
though obviously when a node is failing, then all the connections to
that node vanish, which in turn triggers the deletion of exclusive
queues created by those connections, and deletion of auto-delete queues
where all consumers were connected to that node.
So usage of these flags in conjunction with mirroring is rarely a
sensible combination since the same event that triggers fail-over to a
mirrored queue's slave, i.e. the failure of a node, would usually also
trigger the deletion of the queue.
Queues with a TTL (http://www.rabbitmq.com/ttl.html#queue-ttl) are an
alternative to auto-delete queues. They can tolerate network and client
failures, and, when mirrored, node failures.
More information about the rabbitmq-discuss