Does rabbitmq support to push the same data to multi consumers?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does rabbitmq support to push the same data to multi consumers?

DeepNightTwo
I have a rabbitmq cluster used as a working queue. There are 5 kinds of consumers who want to consume exactly the same data.

What I know for now is using fanout exchange to "copy" the data to 5 DIFFERENT queues. And the 5 consumers can consume different queue. This is kind of wasting resources because the data is the same in file queues.

My question is, does rabbitmq support to push the same data to multi consumers? Just like a message need to be acked for a specified times to be deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Does rabbitmq support to push the same data to multi consumers?

Michael Klishin-2
On 12 June 2014 at 12:32:05, DeepNightTwo ([hidden email]) wrote:

> > I have a rabbitmq cluster used as a working queue. There are 5  
> kinds of
> consumers who want to consume exactly the same data.
>  
> What I know for now is using fanout exchange to "copy" the data  
> to 5
> DIFFERENT queues. And the 5 consumers can consume different  
> queue. This is
> kind of wasting resources because the data is the same in file  
> queues.

It is not wasting any significant amount of resources: message payload
is stored once and a reference is added to multiple queue indices.

> My question is, does rabbitmq support to push the same data to  
> multi
> consumers? Just like a message need to be acked for a specified  
> times to be
> deleted.

As you correctly point out above, the way to do it with RabbitMQ is
to use multiple queues (one per consumer) and a fanout, topic, or similar
exchange type. 
--  
MK  

Software Engineer, Pivotal/RabbitMQ
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss