[rabbitmq-discuss] I have a question about disc nodes..

Alexandru Scvorţov alexandru at rabbitmq.com
Mon Oct 4 17:14:31 BST 2010


Hi,

> I have setup a cluster with 2 disc nodes and 1 or more ram nodes,
> I create a durable exchange and a durable queue
> I check the list_queues, list_bindings command on each server and it works.
> If i take down the first disc node all the queues disappear...

When you declare a queue, it's only created on the node you declared it
on (but it's accessible from all nodes in the cluster).  This means that
if the node is taken down, all of its queues disappear.  What's worse,
if you then try to redeclare a persistent queue on another node,
you'll get a 404 "Not Found" error.

So, what you're seeing is expected behaviour.

>  how can i make the queue persist if at least 1 disc node is
> online?

Have a look at our HA with RabbitMQ Guide [1].  It gives you the steps
necessary to create an active/passive RabbitMQ Cluster (so, when the
first disk nodes goes down, the second just takes its place).  Of
course, this would mean one of the two disk nodes would not be used
until the other fails.

The might be other things you could try.  What are you trying to achieve?

If you don't care about losing some messages, why not just have each
client declare the queue when it needs it?  (i.e. just do a
queue.declare before using the queue).  This way, if the queue's
missing, it will be created, but if it's already there, you'll just use
the old one.

Cheers,
Alex

[1] http://www.rabbitmq.com/pacemaker.html


On Mon, Oct 04, 2010 at 11:48:47AM -0400, Pedram Nimreezi wrote:
> I have setup a cluster with 2 disc nodes and 1 or more ram nodes,
> 
> I create a durable exchange and a durable queue
> 
> I check the list_queues, list_bindings command on each server and it works.
> 
> If i take down the first disc node all the queues disappear...
> 
> Is this normal?  how can i make the queue persist if at least 1 disc node is
> online?
> 
> I don't care if i lose the messages from the server that failed, but I can't
> let the queues just disappear..
> 
> I'm routing to a direct topic bound to queues using routing keys under the
> same name..
> 
> The list_exchanges still shows the exchange, but the queues are missing as
> soon as disc node1 is brought down..
> 
> regadless if ram nodes or another disc node is up...  Please advise..
> 
> 
> -- 
> /* Sincerely
> -------------------------------------------------------------- */
> Pedram N.
> Every man is guilty of every good he did not do - Voltaire

> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list