[rabbitmq-discuss] One producer multiple subscribers

Matthias Radestock matthias at lshift.net
Mon Jul 7 13:12:18 BST 2008


Teemu Pentinsaari wrote:
> I have been trying to establish a message queue where one producer fills 
> the queue and multiple subscribers consumes it.
> The hard part, which I can't get my head around, is to keep messages in 
> the queue until every single last one of the subscribers have received 
> it and only after, that the message should be deleted.
> I have been able to replicate java api examples and send and receive 
> messages with BasicPublish and DefaultConsumer but can't figure out how 
> to make messages last for every subscriber.

So, if I understand you correctly, you want every message to go to *all* 
subscribers. Correct? In that case you should create one queue per 
subscriber, and bind them to the same exchange (a 'fanout' exchange in 
the simplest case).


More information about the rabbitmq-discuss mailing list