[rabbitmq-discuss] One producer multiple subscribers

Teemu Pentinsaari teemu.pentinsaari at kassa.fi
Mon Jul 7 13:28:23 BST 2008


Matthias,

Thanks for your reply. You assume correctly; I do want to send message 
(from single producer) to all subscribers, but due to a limited hardware 
resources, I'd like to use single queue. We are going to send somewhat 
large messages to quite a few clients at once and replicating that same 
message to multiple queues might become a problem. This queue also must 
be durable and all messages must be persistent for we can't quarantee 
that all our clients are online at the same time.

If this can't be done, we are going to investigate 'fanout' and other 
options as you suggested.


Teemu

Matthias Radestock kirjoitti:
> Teemu,
>
> 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).
>
>
> Matthias.





More information about the rabbitmq-discuss mailing list