[rabbitmq-discuss] Simple Sender and Receiver in java

Matthias Radestock matthias at rabbitmq.com
Mon Jul 23 09:57:17 BST 2012

On 23/07/12 09:09, Praveena Kumara wrote:
> The issue was solved for me when i modified the Receiver with no_Ack =
> false and a call to BasicAck.

Glad you got it to work. Btw, if you really want to implement the 
equivalent of "of wait for (just) one message", you should also set 
prefetch to 1. See 
http://www.rabbitmq.com/tutorials/tutorial-two-python.html. That way 
only one message is sent to the client - rather than, potentially, the 
entire queue contents - and at most one message will end up getting 
requeued when the channel is closed.



More information about the rabbitmq-discuss mailing list