Redundant Cluster

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Redundant Cluster

guardion
Hello, i'm having doubts regarding the following situation:

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 ?

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 ? Or ?
Reply | Threaded
Open this post in threaded view
|

Re: Redundant Cluster

Michael Klishin-2
 On 2 June 2014 at 20:26:13, guardion ([hidden email]) 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
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Redundant Cluster

mc717990
If you're worried about the crash - definitely look at two clusters.  You can use shovel to keep them in sync.  We're using a fanout to two queues on the publish side to a rabbit cluster locally.  Then each queue is shoveled to a cluster on the remote side.  

Jason


On Mon, Jun 2, 2014 at 11:37 AM, Michael Klishin <[hidden email]> wrote:
 On 2 June 2014 at 20:26:13, guardion ([hidden email]) 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
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



--
Jason McIntosh
https://github.com/jasonmcintosh/
573-424-7612

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss