[rabbitmq-discuss] producer/consumer and every n-th message

Torsten Curdt tcurdt at vafer.org
Fri Jul 8 00:03:24 BST 2011


Let's say I have n producers sending messages to an exchange and m
consumers consuming from a single queue bound to that exchange. When a
consumer does not acknowledges a message (and dies), the message
should go back into the queue for another consumer to pick it up.

That should be easy to implement I assume?
I also assume for this scenario a direct exchange would do?
How bad would be the contention n and m are fairly large?
...or do I just need to have enough broker?

I would also like to be able to "tap into" the stream of messages
flowing through the exchange. I assume I could use a fanout exchange
instead. Have the normal queue with the m consumers and a second queue
with a single consumer "tapping in".

As the throughput of message can potentially be very high (which is
why there are so many consumers) of course a single consumer cannot
drain the second queue. So my idea was to only care about every n-th

Is there a away to tell the fanout consumer to deliver every message
to Q1 but only every 10th message to Q2?
How else could one do this?


More information about the rabbitmq-discuss mailing list