[rabbitmq-discuss] Sending and Receiving to same queue

Steve Weaver weaveinator at gmail.com
Thu Nov 13 18:57:21 GMT 2008

Hi All -
I am having a problem with sending to a queue while another process is
pulling from the same queue.  I am using Basic.Publish to put the message
and Basic.Get.  Nothing fancy, queue is durable and messages are
persistent.  Two processes (applications) running on same machine, one
receives a message (from remoting) and puts it on queue using
Basic.Publish.  Another process that runs every 5 minutes or so, wakes up
and checks the queue using Basic.Get.  If there is a message it enters a
loop which sends the message down the pipe and then tries to get another
message using same channel, until no more messages then closes channel and
disconnects and goes back to sleep for another 5 minutes.

This all works until the processes line up - sending to queue at same time
as trying to pull from queue.  Then rabbit dies with a (badrpc,nodedown)
status.  If I restart rabbit, all the messages sent are still there
(thankfully) but, I have to restart in order to send / receive another batch
of messages.

So long winded question - I assume there should be no reason a queue cant
send and receive messages at the same time, but is there some sort of
setting or flag I need to check first or a syncronizing process I have to

Thanks very much for any help!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081113/cf7b17b3/attachment.htm 

More information about the rabbitmq-discuss mailing list