If you do a channel.access_request before every channel.basic_publish (or after ever N publishes), then<div>amqplib properly raises the AMQPContentTransmissionForbidden exception since the active state will have been</div>
<div>updated.</div><div><br></div><div>I don't think it's very efficient to do, but it does show that the patch is working. Apparently the AMQP protocol does not</div><div>send an exception to an active client connection until it reconnects or re-requests access.</div>
<div><br></div><div>I definately don't know the AMQP protocol in detail, so someone please correct me if I'm wrong.</div><div><br></div><div>thanks,</div><div>Allan<br><br><div class="gmail_quote">On Mon, May 24, 2010 at 11:33 AM, allan bailey <span dir="ltr"><<a href="mailto:zirpubolci@gmail.com">zirpubolci@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Matthias,<br><br><div class="gmail_quote"><div class="im">On Sun, May 23, 2010 at 10:56 AM, Matthias Radestock <span dir="ltr"><<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Allan,<div><br>
<br>
allan bailey wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I just tried this patch in py-amqplib 0.6.2 and it doesn't seem to work, or raise an exception. It might be<br>
rabbitmq isn't sending the channel.flow.<br>
</blockquote>
<br></div>
Check the rabbit.log for memory alarms; that will tell you whether channel.flow is working.<div><br></div></blockquote><div><br></div></div><div>Yes, I see the alarms. But a connected producer is allowed, w/ the patch to continue sending.</div>
<div>New producers are disallowed from sending though. So it's close. I need for the connected producer</div><div>to catch and exception so that it will stop sending.</div><div><br></div><div>I'll work on this fork and publish it when I get it working with an example.</div>
<div><br></div><font color="#888888"><div>-allan</div></font><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I tested with rabbitmq 1.7.2 on OSX 10.6.2. I'll test on a real OS when I can. I definately need the flow control<br>
to stop producers from overwhelming the server.<br>
</blockquote>
<br></div>
If the patch doesn't work, perhaps you could develop one that does and release it, or a forked repo, to the community?<br>
<br>
<br>
Regards,<br><font color="#888888">
<br>
Matthias.<br>
</font></blockquote></div></div><br>
</blockquote></div><br></div>