[rabbitmq-discuss] Cluster to increase availability
tim at rabbitmq.com
Wed Jan 1 20:06:29 GMT 2014
On 1 Jan 2014, at 14:19, Guilherme Labigalini wrote:
> I was doing some tests by setting a RabbitMQ cluster. I have setup two servers as disk nodes, the queues/exchanges that I created in NODE1 are visible on the NODE2, I tried to publish one message to the queue on NODE1 by posting to the "replicated" exchanged on the NODE2 and it worked well - the message was added to the queue on NODE1.
> To test the "Availability" of my cluster, I stopped Rabbit on NODE1 and tried to publish the a message connecting on the NODE2, since the exchange was bind to a queue on the NODE1 that was down it failed:
Indeed - if the queue isn't available then the message won't be delivered in that scenario.
> My question is, even though I have a cluster, all my nodes must be up during publish operations?
If you publish to an exchange then messages will be routed (based on your chosen topology) to zero or more queues. If the nodes on which those queues were declared crash (or go offline) then the messages won't be delivered.
> How I can make sure that my 'producers' can publish messages when at least one node in the cluster is up and running?
If I understand your question properly - i.e., you want to know how to ensure that publishing doesn't fail even when nodes crash - then I suggest you take a look at mirrored queues: http://www.rabbitmq.com/ha.html
More information about the rabbitmq-discuss