[rabbitmq-discuss] Pathological dead queue behavior in a cluster.

Matthew Sackman matthew at rabbitmq.com
Wed Mar 30 23:10:54 BST 2011


On Wed, Mar 30, 2011 at 03:58:23PM -0600, Jason J. W. Williams wrote:
> > Very interesting. I assume the exchange in a fanout exchange (I see no
> > routing key in your list_bindings output). When in this "broken" state,
> > what happens if you publish to the queue with mandatory set?
> 
> The exchange is a direct exchange. With mandatory set it doesn't raise any
> exceptions.

Curious... though it shouldn't return an exception - it should return
the msg with a basic.return. I have no idea whether pika supports that
or where it would appear.

> I'm noticing the output of list_bindings is different after the node restart
> and then after the redeclare.
> 
> Before Restart:
> 
> Listing bindings ...
> exchange cluster_test queue cluster_test []

That's the binding from the default nameless exchange to the
"cluster_test" queue with the routing_key of "cluster_test".

> cluster_test exchange cluster_test queue cluster_test []

That's the binding from the cluster_test exchange to the cluster_test
queue with the binding key cluster_test.

> Listing bindings ...
> exchange cluster_test queue cluster_test []
> ...done.

The latter binding has gone. I suspect your exchange has not been
declared durable. Your pika code certainly doesn't make any attempt to
set the exchange declaration durable. As with queues, durable is
different from auto_delete.

> It looks like there's an extra binding that doesn't get recreated.

Binding recreation is dependent on both the exchange and queue being
durable, even if the exchange survives due to the fact it's part of a
cluster.

Matthew


More information about the rabbitmq-discuss mailing list