[rabbitmq-discuss] Low disk space causes RabbitMQ to lose messages instead of blocking the connection

Emile Joubert emile at rabbitmq.com
Mon Jun 3 10:32:38 BST 2013


On 03/06/13 06:08, Joe wrote:

>  - *Am I doing something wrong?*
>  - *Is this a bug in RabbitMQ?*
>  - *If so, is there a workaround?*

You are probably publishing into network buffers while the resource
alarm is set. Since the messages are tiny in your example, the network
buffers will take a while to fill up, but they will eventually fill up
and block publishers. Reducing the network buffer size will speed this up.

If you sever the connection before the messages reach the broker then
they will be lost. If the connection remains up when the resource alarm
is cleared then all messages will eventually make their way to the
broker. Use publisher confirms to avoid the possibility of message loss
when publishing: http://www.rabbitmq.com/confirms.html

Inserting "channel.waitForConfirms();" immediately after the publish
step will reduce overall throughput, but make the effect of the resource
block apparent to publishers immediately.


More information about the rabbitmq-discuss mailing list