[rabbitmq-discuss] How RabbitMQ handles the messages in case of crash ?
michael at rabbitmq.com
Fri Oct 4 11:57:30 BST 2013
On oct 4, 2013, at 2:52 p.m., Mandy <mandyce2006 at gmail.com> wrote:
> How receiver program come to know if there are any messages in its queue ?
You can use queue.declare and check the number of messages on queue.declare-ok
> Since when sender sends any message on receiver's queue, its callback method
> gets called.
If you don't want messages to be pushed to the consumer, use basic.get (which
is very similar to HTTP GET) instead of basic.consume.
> While creating the exchange do I need to set any flags? ( flags like
> durable, auto_delete )
Exclusive queues can be only be used on one connection and will be removed
what that connection is closed. Auto-delete queues will be automaticlly deleted when the last
consumer disconnects (but never if there was never was a consumer).
Sounds like you want a non-exclusive, non-autodelete queue. Make it durable
if you want it to survive RabbitMQ restart.
I recommend that you take a look at the tutorials that explain queue attributes
and much more: http://www.rabbitmq.com/getstarted.html.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the rabbitmq-discuss