[rabbitmq-discuss] [Q] best way to add a sequencer to the broker

Chuck Remes cremes.devlist at mac.com
Mon Dec 29 17:51:18 GMT 2008


On Dec 29, 2008, at 11:43 AM, Chuck Remes wrote:

>
> On Dec 29, 2008, at 10:18 AM, Ben Hood wrote:
>>> 3. Is there a way to make this more dynamic so I do not have to
>>> declare all the exchanges up-front in this sequencer code? Ideally
>>> this service could detect that new exchanges were declared by other
>>> services and automatically subscribe to them to do the sequence
>>> stamping and routing.
>>
>> I don't know if the terminology is right here, because you generally
>> don't subscribe to an exchange, rather to a queue.
>
> You are right. I was confusing the terminology. Let me try again.
>
> As other services declare exchanges and publish to them, I would like
> my Sequencer to dynamically detect the existence of a new Exchange so
> it can create a queue, bind the new queue to the Exchange and receive
> messages from it for processing and republishing.


Let me provide more reasoning for why I would like to do this  
dynamically.

PublisherA may create a durable topic Exchange called out.topic1.  
PublisherB may create a non-durable Exchange called out.topic2.

The Sequencer has to republish all messages from both Exchanges to two  
new Exchanges that share the same semantics (durable vs non-durable,  
immediate, mandatory, etc). The Sequencer would need to declare a new  
durable Exchange called in.topic1 for republishing those messages.  
Likewise, it would declare a non-durable Exchange for publishing to  
in.topic2. (I hope I am not mixing up my durable/immediate/mandatory  
terminology with Exchanges when they apply to Queues or something.)

A naive way of creating the Sequencer would be to hardcode all of  
these things but that could rapidly become a maintenance nightmare as  
the distributed application grows.

cr





More information about the rabbitmq-discuss mailing list