[rabbitmq-discuss] Flow Control

Ben Hood 0x6e6562 at gmail.com
Sun Nov 9 22:28:10 GMT 2008


Edwin,

On Sun, Nov 9, 2008 at 6:58 PM, Edwin Fine
<rabbitmq-discuss_efine at usa.net> wrote:
> This is greatly welcome news! I look forward to the implementation of this
> in the Erlang client, so that I can pause my producers when I get the
> channel.flow command from the broker and avoid any possibility of exhausting
> Rabbit's memory. Any ETA?

Not really. But I have knocked up a first version that works - 19560
refers. The only I am not sure about yet is the fact that publish
function uses gen_server:cast/2 under the covers, making it difficult
to on this invocation. My first thought was to keep the cast/2
invocation as it is and just send out {pause,resume} atoms to a
registered flow control handler, but this means more code on the
client side. I suppose you could add a convenience function to
encapsulate the blocking receive when you're in the pause state, but
there may be a simpler way to do this. Have a look at the code
yourself and maybe you have an idea.

HTH,

Ben




More information about the rabbitmq-discuss mailing list