[rabbitmq-discuss] active/active message persistence problem

Cameron Davison cameron.davison at gmail.com
Tue Nov 22 05:46:24 GMT 2011


What order are you restarting the nodes? Any rabbitmq server that
connects to a cluster will start its queue fresh and begin replicating
from the master. You should wait and make sure that all the queues are
synchronized before you shut down the master, or new master. Old
messages are not read from nodes that connect to the cluster because
the assumption is that the queue will go to 0 soon and then the old
messages will not matter so only the new messages will be important.
Also, you should make sure that the "x-ha-policy" is set to "all" or
to the "nodes" that you would like the queue to be mirrored to.

Cameron

On Mon, Nov 21, 2011 at 7:14 PM, Jeffrey Chen <cpthk at hotmail.com> wrote:
> Hi RabbitMQ community:
>
> I am encounter this problem about message persistence. Here is my case, I
> have 2 server nodes with active/active setup, both are persisted to DISK.
> The queue declarations are defined as durable.
> This is what I got when doing:
>
> # rabbitmqctl cluster_status
> Cluster status of node 'rabbit at aaron-vm177' ...
> [{nodes,[{disc,['rabbit at vm1','rabbit at vm2']}]},
>  {running_nodes,['rabbit at vm1','rabbit at vm2']}]
> ...done.
>
> # rabbitmqctl list_queues
> Listing queues ...
> test    10
> ...done.
>
>
> My vm1 is currently master node. When I stop RabbitMQ service in vm1, and
> start it back up. I check my messages in the queue, the messages are still
> there. This time when I stop RabbitMQ service in vm2. The messages will be
> gone. It seems like when I restart both server nodes, the data will be lost.
> Does anyone know the reason? Is there any way to work around this?
>
> My goal is that any server nodes down, and when I bring it back up, no data
> will be lost.
>
> Jeffrey.
>
> _______________________________________________
> 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