[rabbitmq-discuss] Exclusive Producers?

Michael Klishin mklishin at gopivotal.com
Tue Feb 18 10:16:32 GMT 2014


On 18 Feb 2014, at 06:06, Tarun Mistry <tarun.mistry at gmail.com> wrote:

> 1) I have several message producers, only 1 of these is the primary, the remainder as all backups. 
> 2) The primary is defined as the process that controls a single queue and can post messages to it.
> 3) If the primary process fails, I want a backup to take over immediately.
> 4) All backups are in a race to get control of the queue (from 2)
> 5) Once a backup gains control, it is now the primary.
> 
> Using Rabbit speak, I feel like I need something called an "exclusive producer”. 

There is no such feature in RabbitMQ.

> Do I need to fudge this by introducing a second queue and having all the processes connect to this using the "exclusive consumer" pattern, and then use this to determine who can control the main queue?

This is a distributed coordination problem. I’d recommend using a separate tool (ZooKeeper, Redis, etcd)
for coordination.

MK

Software Engineer, Pivotal/RabbitMQ




More information about the rabbitmq-discuss mailing list