[rabbitmq-discuss] Producers hanging when reaching high memory watermark on 1.8.1

Matthias Radestock matthias at rabbitmq.com
Mon Aug 16 04:05:41 BST 2010


Dave Greggory wrote:
> Spring-AMQP doesn't seem to abide by flow control messages when
> sending.

That would surprise me. It's calling into RabbitMQ's Java client APIs, 
which take care of flow control automatically.

What evidence are you seeing that flow control isn't working?

> What's the standard pattern for doing so when using basic publish?

You shouldn't have to do anything; basic.publish should automatically 
block when the server has told the client to stop sending messages.

> And how does setting the high memory watermark to 0 affect how
> RabbitMQ allocates memory for itself? Does it still limit itself to
> 40% or use up all that's there? Is that advisable?

The default threshold is 40% instead of 100% since we need a safety 
margin. See http://www.rabbitmq.com/extensions.html#memsup for details 
of how the whole flow control mechanism operates.

In some setups a higher threshold may be safe, but disabling flow 
control altogether is not advisable.

Mark Pollack wrote:
 > If this is a matter of calling the 'flow' method on the channel,

That's for flow control in the other direction, i.e. the client telling 
the server that it should stop sending messages.



More information about the rabbitmq-discuss mailing list