[rabbitmq-discuss] Exclusive consumers via STOMP

Simon MacMullen simon at rabbitmq.com
Fri Apr 25 14:46:28 BST 2014

On 24/04/2014 12:53, Nagy, Attila wrote:
>> Possibly. In RabbitMQ consumer exclusivity means no more than 1
>> consumer can
>> be added on a given queue. This includes federation links for
>> federated queues.
> Exactly what I need.

It's worth noting that no more than one consumer can be on one 
individual queue, not one set of queues that are federated together.

>> I need to run some tests to see how queue federation works in such case.
> How does queue federation consumes from the queue? I mean it's not just
> a normal consumer, because if nobody is on the other side, it won't
> consume. Or it just starts consuming if there are somebody?
> But there are even more conditions need to be true to get messages to it
> (described on the federation page), so this is not so simple.

It is a low priority (http://www.rabbitmq.com/consumer-priority.html) 
consumer that starts and stops according to whether the downstream 
"needs" messages.

> Also, if consumer A on broker A consumes from the queue, but broker B
> can't consume from broker A's queue, I assume consumer B on broker B
> will be able to consume from the queue on broker B, so this essentially
> doesn't work in a federated setup.

That's correct.

> Or is there something which disallows this?

No. And really there couldn't be; in order to do that you'd need some 
distributed shared state, which would have to be Consistent and 
Available, thius not Partition Tolerant, thus not really compatible with 
how federation works.

Cheers, Simon

More information about the rabbitmq-discuss mailing list