[rabbitmq-discuss] Redundant Cluster

Michael Klishin mklishin at gopivotal.com
Mon Jun 2 17:37:12 BST 2014


 On 2 June 2014 at 20:26:13, guardion (guardion at sapo.pt) wrote:
> > I have a producer sending messages to a rabbitmq cluster composed  
> by two
> machines (A and B)
>  
> I can use mirrored queues to achieve availability in case of crash.  
> A and B
> have the same state (exchanges, queues, messages) right ?

Queue mirroring replicate queue state. It does not affect exchanges.

See http://www.rabbitmq.com/ha.html and http://www.rabbitmq.com/partitions.html
for more information.

> What i need is that messages delivered to the cluster are replicated  
> and
> consumed individually, meaning, Message Y arrives at the cluster,  
> then it's
> replicated to A and B, and consumed by a consumer working in A and  
> another
> consumer working in B.
>  
> The same message should be consumed separatly in each node.
>  
> How can i make this? Do i need to turn off mirored queues and create  
> different exchanges ?

You need to use fanout or topic exchange and make sure that messages
are routed to multiple queues. First part of your question suggests
you want those queues to be mirrored.

However, you may want to replicate data between two clusters. See
Shovel and Federation plugins:

http://www.rabbitmq.com/shovel.html
http://www.rabbitmq.com/federation.html
--  
MK  

Software Engineer, Pivotal/RabbitMQ


More information about the rabbitmq-discuss mailing list