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

Dave Greggory davegreggory at yahoo.com
Mon Aug 16 04:40:37 BST 2010


Hi Matthias,

What I'm trying to achieve is to get my client apps to be unaffected if RabbitMQ goes down. In this case, from hitting high memory watermark. Right now, when Rabbit hits that watermark, the clients hang or slow down to a crawl. Maybe that is caused by the threads being blocked by flow control, there by making it appear to be hung. 

 I don't want that. I want sends to throw an exception or some other event I can respond to so that the client apps don't break down or suffer a performance hit just because they lose messaging functionality. How do I do that?

Thanks, 
Dave


On Aug 15, 2010, at 11:05 PM, Matthias Radestock <matthias at rabbitmq.com> wrote:

> Dave,
> 
> 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.
> 
> 
> Regards,
> 
> Matthias.


More information about the rabbitmq-discuss mailing list