[rabbitmq-discuss] loss o messages on a cluster + durable queues + mirrored queues
matthias at rabbitmq.com
Wed Jan 9 21:22:16 GMT 2013
On 09/01/13 18:57, Alexandre Bunn wrote:
> Step 0 - Node1 (master) Node2 (slave)
> Step 1 - I write 2 messages, at ha.teste queue, 1 on each member of
> the cluster and the messages are mirrored as expected. Here there are
> two messages on each nodes (rabbitmqctl list_queues)
As an aside (this isn't the source of your problem)...
In a cluster, queues are visible on all nodes regardless of mirroring.
And mirroring in rabbit is a strict master-slave setup - *all* actions
take place on the master and are then replicated on the slaves.
So, in the above case, when you are publishing the message to the 2nd
node it actually gets sent from there to the queue's master node, is
processed there, and then replicated to all slaves.
> - Step 2 - I've stopped rabbitmq-server on node1 and node2 assume the
> - Step 3 - I start the rabbitmq-server on node1, node2 still master and
> node1 is running as slave.
> - Step 4 - I've stopped rabbitmq-server on node2 and node1 assume the
> master but the messages disapeared
You are running into http://www.rabbitmq.com/ha.html#unsynchronised-slaves.
More information about the rabbitmq-discuss