[rabbitmq-discuss] RPC over Shovel or Federation

Simon MacMullen simon at rabbitmq.com
Mon Feb 10 10:11:09 GMT 2014

Hi Vitor.

Neither shovel nor federation is particularly designed for RPC with 
dynamic reply queues. So you have a few options:

1) Redesign your clients to use fixed queues for replies. This is the 
highest performance solution (even with a single broker) since creating 
a new queue for each RPC is orders of magnitude more expensive than 
sending and receiving a message. You can then use either shovel or 
federation for your reply queues (federation is probably simpler).

2) Declare dynamic reply queues and use queue federation on them. The 
problem is that queue federation doesn't attempt to federate queue 
deletion; and since the federation mechanism uses consume / cancel for 
flow control, autodelete queues might get autodeleted at the wrong time. 
So the only option you have to prevent a leak of reply queues is to give 
them an x-expires argument.

In the future we hope to make the default exchange federatable, in 
effect giving global queue addressing across a federation. Not sure when 
we'll have the time to work on that though...

Cheers, Simon

On 10/02/2014 09:32, Vitor Cardoso wrote:
>> Hi,
>> I’m Vitor Cardoso, i am a software developer and a i have started work
>> with RabbitMq a few months ago.
>> I think you can help me on this:
>> RabbitMq “local” - L
>> RabbitMQ “external”- E
>> I have this scenario, “n” instances of RabbitMq locally installed
>> isolated from each other, one RabbitMQ for each server,them i have one
>> server “external” that contains a RabbitMQ server and other software
>> using it.
>> So in certain point i need to send a message (an RPC) from my E to one
>> of this L, so i have a rabbitmq.config file in L that consumes from a
>> queue “X” of E and publish to exchange “Y of L. It work’s, but like
>> message is an RPC, it is created a dynamic queue for response in E and
>> this context don’t is passed to my L, so my L consumes the message and
>> can’t send the response.
>> It’s possible do this by this way? Can i pass context of a RPC throw
>> shovel or federation?
>> Thanked for your help,
>> VItor Cardoso
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list