[rabbitmq-discuss] ReturnListener is not invoked

Matthias Radestock matthias at rabbitmq.com
Tue Jan 22 23:31:01 GMT 2013


On 22/01/13 22:35, Dmitriy Bannikov wrote:
> By the way, does it mean that if RabbitMQ server doesn't have available
> disk space more than disk_free_limit, messages will be lost?

Depends. The server stops reading from the TCP socket, since it has 
nowhere to put the messages it would be reading. So the messages will 
pile up in various buffers, and eventually the publishing application's 
tcp send operations will encounter full buffers (and, usually, block).

If at that point the disk alarm (or any similar alarm) goes away then 
the message flow will resume and everything will continue as if nothing 
had happened. It's no different from a the server just appearing a bit slow.

If, otoh, the connection drops then the data in the various buffers 
along the way will be lost.

> but how will I know that this particular message hasn't been added
> to  queue?

Publishing in AMQP is an asynchronous operation - the only way to get 
acceptable performance regardless of network latency. So there is no 
direct/immediate indication of the fate of the message. However...

Any successfully completed synchronous operation following a series of 
publishes (or other async operations) serves as an indicator that the 
preceding async operations were received by the server and successfully 

Though this still doesn't mean the messages have been safely enqueued, 
stored on disk if necessary, mirrored, etc, etc.

That's what confirms are for. http://www.rabbitmq.com/confirms.html



More information about the rabbitmq-discuss mailing list