Hello<div><div><br></div><div>Yes, you&#39;re right.</div><div>I detected with management console that there are too many consumers. Reviewed code and fixed it ( basic_consume out of loop ) but I sent the example without the corrections.</div>
</div><div><br></div><div>Concerning to close connection:</div><div>umm, it seems that depends�on the architecture:</div><div>*) consumer, publisher, RabbitMQ at localhost work fine.No connections are closed.</div><div>*) consumer, publisher at localhost. RabbitMQ other machine (virtual machine)-&gt;Connection is �closed</div>
<div><br></div>
<div>Ok-&gt; it&#39;s not rabbitmq problem. I&#39;ve to take a look�<br><br>Thanks a lot.</div><div><br></div><div><br><div class="gmail_quote">2012/7/26 Steve Powell <span dir="ltr">&lt;<a href="mailto:steve@rabbitmq.com" target="_blank">steve@rabbitmq.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear ___,<div><br></div><div><div>Your example code appears to register the consumer callback repeatedly</div>

<div>in a loop, draining events after doing this. This cannot be good use of</div><div>the interface (but I could be wrong).</div><div><br></div><div>You may like to look at <a href="http://pypi.python.org/pypi/librabbitmq/" target="_blank">http://pypi.python.org/pypi/librabbitmq/</a> for</div>

<div>information about how to use the library correctly. There is an example</div><div>on the first page that demonstrates the consumer idiom.</div><div><br></div><div>The five minutes pause is likely enough time either for the repeated</div>

<div>stuff to clog up the client somehow, or for some network mechanism to</div><div>close the connection since nothing is happening on it. RabbitMQ will not</div><div>do this, but I am told there are network firewalls and stuff that will</div>

<div>unceremoniously chop a connection if it is silent for a while. It is not</div><div>clear that the client would ever notice this.</div><div><br></div><div>If these steps do not help I recommend looking in the RabbitMQ logs to</div>

<div>see why the connection is lost. Come to think of it, I would recommend</div><div>looking there anyway. You do not say if your tests are run locally or if</div><div>the server is on a different machine from the publisher/consumers?</div>

</div><div><br></div><div>Good luck,�</div><div><div>
<div style="word-wrap:break-word"><div style="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Georgia;word-spacing:0px"><div style="word-wrap:break-word">

<div><div style="font-style:normal;word-wrap:break-word"><div><div style="font-family:Georgia;font-size:medium;font-weight:normal;font-style:normal"><div><font size="3"><span style="font-size:12px">____ ____�</span><span style="font-size:11px">(<i>a happy bunny</i>)</span></font></div>

</div><div><font><div style="font-weight:normal;font-style:normal;font-family:Helvetica;font-size:12px"><i><font face="Georgia"><span style="font-size:10px">----------yet more definitions from the SPD----------</span></font></i></div>

</font></div></div></div><span style="font-style:normal;font-weight:normal;font-family:Helvetica;font-size:12px"><font face="Georgia" size="2" style="font-style:normal"><span style="font-size:10px"><b>corrugate</b>�(</span></font><font face="Georgia"><span style="font-size:10px"><i>n.</i>) T.V. soap scandal.</span></font></span><div style="font-style:normal;font-family:Georgia;font-size:medium;font-weight:normal">

<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Georgia;word-spacing:0px"></span><span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Georgia;font-weight:normal;font-style:normal;font-size:10px"><b>olympic</b></span><span style="font-family:Georgia;font-weight:normal;font-style:normal;font-size:10px">�(</span><span style="font-family:Georgia;font-weight:normal;font-size:10px"><i>n.</i>)</span><span style="font-family:Georgia;font-weight:normal;font-style:normal;font-size:10px">�A camp road-digger.</span></span></div>

<div style="font-family:Georgia;font-size:medium"><span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Georgia;font-style:normal;font-size:10px"><b>jamboree</b></span><span style="font-family:Georgia;font-weight:normal;font-style:normal;font-size:10px">�(</span><span style="font-family:Georgia;font-weight:normal;font-size:10px"><i>n.</i></span><span style="font-family:Georgia;font-weight:normal;font-style:normal;font-size:10px">) A conserve made from French cheese.</span></span></div>

</div></div></span></div></div>
</div>
<br><div><div>On 26 Jul 2012, at 10:34, APA wrote:</div><br><blockquote type="cite"><div><div>High, I wonder if someone can help me</div><div><br></div><div>I&#39;m using python and librabbitmq</div><div><br></div><div>I&#39;ve a publisher and consumer (files are attached)</div>

<div><br></div><div>First Test�</div><div>The consumer declares and binds a queue to the exchange with AutoDelete=True</div><div>Start the consumer then the publisher.</div><div>Everything works great until I kill the publisher. Then wait five minutes and run the publisher again.</div>

<div>When it starts, RabbitMQ deletes the queue. The consumer does not get notice that he &quot;loss connection&quot;</div><div><br></div><div>Second Test</div><div>Change the consumer queue to be AutoDelete=False.</div>
<div>
Everything works great until I kill the publisher. Then wait five minutes and run the publisher again.</div><div>The queue is not deleted but the consumer does not get notice that he &quot;loss connection&quot; and no message are received.</div>

<div><br></div><div>This behavior is normal or I&#39;m making a great mistake, because I&#39;m supposing the consumer should be listening to incoming messages from publisher.</div><div><br></div><div>Thanks in advanced</div>

<div><br></div><div>Best regards</div></div><div><div><br></div><div><br></div><div><br></div><div><br></div></div><span>&lt;consumer.py&gt;</span><span>&lt;publisher.py&gt;</span>_______________________________________________<br>

rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>

</blockquote></div><br></div></div></blockquote></div><br></div>