<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Code below uses tmm1-amqp instead of Bunny. I get 2000mps using this code, draining from the same queue.</div><div><br></div><div><b><br></b></div><div><b>test_pop_async.rb</b></div><div><i>---</i></div><div><i><br></i></div><div><i>require "rubygems"</i></div><div><i>require 'mq'</i></div><div><i><br></i></div><div><i>Signal.trap('INT') { AMQP.stop{ EM.stop } }</i></div><div><i>Signal.trap('TERM'){ AMQP.stop{ EM.stop } }</i></div><div><i>&nbsp;</i></div><div><i>count ||= 0</i></div><div><i>prev_time ||= Time.now</i></div><div><i><br></i></div><div><i>AMQP.start(:host =&gt; 'localhost') do</i></div><div><span class="Apple-style-span" style="font-style: italic; ">&nbsp;&nbsp;MQ.queue('process_telemetry').subscribe(:ack =&gt; false) do |headers, body|</span></div><div><span class="Apple-style-span" style="font-style: italic; ">&nbsp;&nbsp; &nbsp;count += 1</span></div><div><i>&nbsp;&nbsp; &nbsp;if count &gt; 100</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp;t = Time.now</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp;puts("msgs pops per sec: #{count / (t - prev_time)}")</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp;prev_time = t</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp;count = 0</i></div><div><i>&nbsp;&nbsp; &nbsp;end &nbsp; &nbsp;</i></div><div><span class="Apple-style-span" style="font-style: italic; ">&nbsp;&nbsp;end</span></div><div><span class="Apple-style-span" style="font-style: italic; ">end</span></div><div><br></div></div><div><br></div><br><div><div>On 8/09/2009, at 1:53 PM, Chuck Remes wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Progress! Please share the code you are using now so we can compare it to the bunny code. Perhaps something obvious will jump out at us (punny!).<br><br>cr<br><br>On Sep 7, 2009, at 8:48 PM, Aisha Fenton wrote:<br><br><blockquote type="cite">Hi Paolo,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">the code provided for the publisher actually does seem likely to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">produce the channel leak<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I made the suggested change, and it made no difference.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have changed the test code to use tmm1-amqp (another Ruby AMQP library) and I'm now getting 2000mps, and no degradation on deep queues.<br></blockquote><blockquote type="cite">So, for me at least, problem solved!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Chris (author of Bunny I believe?), maybe you can shed some light on something I'm doing wrong with how I'm using Bunny?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Ash<br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></body></html>