[rabbitmq-discuss] rabbitmq-c Memory-Based Flow Control API.

Alan Antonuk alan.antonuk at gmail.com
Wed Jan 8 06:10:22 GMT 2014

rabbitmq-c doesn't have an equivalent API that invokes a callback when a
channel is throttled.

That said, rabbitmq-c does support the connection.blocked extension (
http://www.rabbitmq.com/connection-blocked.html), you do have to do a bit
of work to get it to work:

1. You'd need to send the 'connection.blocked'=true value as a part of the
capabilities table when calling amqp_login()
2. As you're publishing you'd need to periodically watch for a
AMQP_CONNECTION_BLOCKED_METHOD (using amqp_simple_wait_frame_noblock(), and
stop publishing when you receive this messages, only resuming when you
receive a AMQP_CONNECTION_UNBLOCKED_METHOD from the broker.

Unfortunately I don't have any example code that demonstrates this at the
moment, but I'll try and put something together in the next few days. You
can track the issue here: https://github.com/alanxz/rabbitmq-c/issues/161


On Tue, Jan 7, 2014 at 6:37 AM, Rohit Patle
<Rohit.Patel2 at techmahindra.com>wrote:

>  Hi,
> Due to vm_memory_high_watermark reached to 0.4%, My publisher gone
> blocked. Is there any mechanism to identify this in application in
> rabbitmq-c library just like java and .NET client libraries are having?
> Thanks & Regards,
> Rohit
> ------------------------------
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140107/6ad48653/attachment.html>

More information about the rabbitmq-discuss mailing list