[rabbitmq-discuss] Message routing

Martin Sustrik sustrik at imatix.com
Wed Nov 28 17:48:04 GMT 2007

> Interesting.....  I think I'm beginning to get the picture, but I'm
> still not completely happy.  Suppose you have 500 different exchanges
> necessary to manage this. Your producer application does (what I'd call
> the administration job) of creating the exchanges and is now busy
> routing messages to all the different exchanges.  A customer contacts us
> and says he wants to get message type 'D' in addition to messages 'A',
> 'B' and 'C' that he had before.  Maybe there's already an exchange with
> this profile, maybe not.

I suppose you know what services you are offering in advance. So the 
producer application can create all of them as it starts.

When client calls and requests access to some service the only thing you 
have to do is to grant him necessary privileges to bind to the specific 
exchange. I don't know how this can be done using RabbitMQ. *Question 
for RabbitMQ team!*

> The 'admin' task now is firstly (maybe) to create the new exchange and
> secondly to reconfigure the customer appl to point to a new exchange.
> The first task requires the producer program to be stopped,
> reconfigured, and restarted. 

Not true. Take into account that exchanges can be created dynamically in 
the runtime. So if you want to add services without restarting the 
broker, either publiching application or a separate admin application 
can take care of that.

Note: The AMQP protocol is specifically designed to allow this kind of 
interaction. The default semantics for commands like Exchange.Declare is 
'create the exchange if it does not already exist' meaning that you can 
safely 'declare' the exchange even from multiple applications.

> The second requires us to contact the
> customer.

You can choose to create bindings to consumer's queue from producer 
side, which is kind of uncommon, but well doable in run-time though.


More information about the rabbitmq-discuss mailing list