[rabbitmq-discuss] mirrored queue cluster

PATAR, SAGAR sp345s at att.com
Fri Oct 4 21:51:16 BST 2013


You can have multiple consumers per queue. On exclusive queues, they all have to be on the same connection.
--> will each consumer get a copy of the message?  Also connections will be different as the clients are different ...


"If that's not sufficient, you can use exchange-to-exchange bindings to first distribute
messages between exchanges and those (fanout) exchanges will distribute messages
between queues.
That is only necessary if every consumer needs to get a copy of every message. If that's not
the case, simply add as many consumers as necessary on every queue."

We have exactly the above scenario BUT we don't want to create multiple queues .. one for each client and have them consume a copy ...
In the above case looks like we have to mirror all the queues from fanout exchange ..?? is there any way we can avoid that ..

Also when a new clients come in we have to create a new Queue ..... manual change we want to avoid ...I know we can have an exchange and have them consume from there but to avoid failover scenarios we have to have a queue and then mirror it right ...

-----Original Message-----
From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Michael Klishin
Sent: Friday, October 04, 2013 4:38 PM
To: Discussions about RabbitMQ
Subject: Re: [rabbitmq-discuss] mirrored queue cluster


On oct 5, 2013, at 12:30 a.m., "PATAR, SAGAR" <sp345s at att.com> wrote:

> Only 1 consumer can consume a message from a Queue right ...

You can have multiple consumers per queue. On exclusive queues, they all have to be
on the same connection.

> With multiple clients we are expecting multiple consumers .. and we need to have the same message consumed by all the consumers ..
> I have seen the tutorial from that it looks like each consumer needs to have a separate queue and so a copy of a message will be forwarded ...

If that's not sufficient, you can use exchange-to-exchange bindings to first distribute
messages between exchanges and those (fanout) exchanges will distribute messages
between queues.

That is only necessary if every consumer needs to get a copy of every message. If that's not
the case, simply add as many consumers as necessary on every queue.

> In case we are mirroring queues..Why do we want to mirror all the queues since they have exactly same messages ...

Mirrored queues is a high availability feature. If only one node in a cluster has contents of a queue
and that node fails, the entire queue content is gone. With mirrored queues, one of the mirrors
is promoted to master.

MK





More information about the rabbitmq-discuss mailing list