qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Boyd <jdb...@etinternational.com>
Subject Re: How to properly implement a 1-to-N pattern
Date Wed, 02 Sep 2009 14:59:22 GMT
On Wed, 2009-09-02 at 14:33 +0000, acacio.centeno@terra.com.br wrote:
> 	                By what I’ve read on the AMQP specification,
> should I have N consumers to a queue, for each message posted to it,
> one of the consumers is going to be activated in round-robin. The
> spec call this a store-and-forward-queue (section 2.1.1). What If I
> want to have all the consumers alerted about each message posted? 
> 	                I figured that I could manage to have each of them
> creating a queue and binding it to a fanout Exchange. Then, for each
> message posted to the Exchange, all the queues would get their copies
> and thus all the consumers would be alerted about it. 
> 	                So, is this the right way to implement the scenario
> of having a producer activating N consumers or is there another type
> of exchange/queue that would give me this functionality? 
> 	Thanks in advance,

I'm using the pub/sub exchange for both what you are already doing (N
consumers in a round-robin) and what you want to do (broadcasting to all
N consumers)

For broadcasting to N consumers, they all subscribe to the same routing
key, but have a unique local queue name. 

When I want to send a message and have only one of the N consumers get
it in more or less round-robin manner then each consumer has the same
local queue name.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message