[rabbitmq-discuss] Multiple consumers of one exchange

evkdev at gmail.com evkdev at gmail.com
Mon Nov 28 16:53:47 GMT 2011

I have a durable Fanout exchange, where one or more producers post their messages. Multiple consumers are working with this exchange, each with it’s own queue binded to this exchange.
I want all consumers can receive all messages for (for example) last week, if they are listening now or not. So suppose I open some application and start listening. I want to receive all messages for the last week first, and then receive incoming messages too (together with other consumers). How can I do that? First, I created one named queue with x-message-ttl of one week, binded to the exchange. When receiving a message from this queue, I’m not sending ack. So every time I open application, I indeed see all messages. But if I have two clients connected, only first one receives all messages. Second one receives them only if I close first consumer. The same is when each consumer has it’s own queue. When multiple clients connected – only one of them receives a message. What am I doing wrong? How can I get the desired behavior?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111128/a14fd123/attachment.htm>

More information about the rabbitmq-discuss mailing list