[rabbitmq-discuss] Using Subscriptions in different ways (was Re: Multiple consumers)
Matthew Sackman
matthew at lshift.net
Tue Jul 28 13:48:59 BST 2009
Hi Adriana,
On Tue, Jul 28, 2009 at 03:11:58PM +0300, Adriana Rodean wrote:
> Thank you very much for your reply and example :)
> I subscribed like this but now i get the published message only when
> both subscribers are online.
> If subscribers are offline when message is published neither of them
> gets the message.
> What can i change so the subscribers get the message even if they are
> offline when message is published?
In this case you need to make sure the exchange and both queues are
created in advance of the subscribers connecting. A message sent to an
exchange which has no queues bound to it will (under normal
circumstances) be dropped silently. This is what I suspect is happening
in your case. Create the exchange, then the two queues and bind them to
the exchange before the first message is published. The consumers should
pick the messages up at their leisure when they connect.
Matthew
More information about the rabbitmq-discuss
mailing list