<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2013/5/19 Nikola Savic <span dir="ltr">&lt;<a href="mailto:niks@osic.rs" target="_blank">niks@osic.rs</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

With every execution, PHP scripts connects to RabbitMQ and post
      1-3 messages</blockquote></div><br>So the consumer apps are constantly being terminated, started, then they connect and consume</div><div class="gmail_extra">messages (I assume using basic.get)? That&#39;s far from being very efficient, RabbitMQ was</div>

<div class="gmail_extra">really built with long-running apps in mind.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Plus, with basic.get and immediate processing you get one message at a time. With &quot;push API&quot;</div>

<div class="gmail_extra">consumers it can be multiple messages at once. SeeĀ <a href="http://www.rabbitmq.com/tutorials/tutorial-two-python.html">http://www.rabbitmq.com/tutorials/tutorial-two-python.html</a>,</div><div class="gmail_extra">

for example.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I don&#39;t really know what to recommend besides at least not reconnecting all the time. AFAIK php clients</div><div class="gmail_extra">only support basic.get and not &quot;push&quot; deliveries, neither a long-running PHP process can offer any</div>

<div class="gmail_extra">way of concurrent processing.</div><div class="gmail_extra"><br></div><div class="gmail_extra">You can try fetching multiple messages before you process them.<br>-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br>

<a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br>
</div></div>