<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">David,<br><br>couple of months ago i submitted a patch to support read_timeout in rabbitmq-c.&nbsp; <br><span><a target="_blank" href="http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2010-June/007453.html">http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2010-June/007453.html</a></span><br>I remembered getting email from you about adding this patch to the src later.<br><br>attached please find the patch again.&nbsp; it uses select() to timeout on read, so the wait_frame() would not block forever.<br>we have used it in production for 6 months without any problems.<br>thanks.<br><br>-alex<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr
 size="1"><b><span style="font-weight: bold;">From:</span></b> David Wragg &lt;david@rabbitmq.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Deepak Vijayvergiy &lt;vdeepak@yahoo-inc.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> "rabbitmq-discuss@lists.rabbitmq.com" &lt;rabbitmq-discuss@lists.rabbitmq.com&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, January 17, 2011 1:36:43 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [rabbitmq-discuss] Regarding the non-blocking call of "amqp_simple_wait_frame"<br></font><br>
Hi Deepak,<br><br>Deepak Vijayvergiy &lt;<a ymailto="mailto:vdeepak@yahoo-inc.com" href="mailto:vdeepak@yahoo-inc.com">vdeepak@yahoo-inc.com</a>&gt; writes:<br>&gt; I am implementing RabbitMQ-C client library in my c++ project and I<br>&gt; have a question about the message reading from the queue.&nbsp; We need to<br>&gt; call the function amqp_simple_wait_frame(), and we are blocked here to<br>&gt; get the result, and then return when we get the message.&nbsp; Question is:<br>&gt; Do you also have some other way in which we can read the message<br>&gt; without blocking?<br><br>rabbitmq-c does not currently support non-blocking operation.&nbsp; You could<br>use threads though: have one thread responsible for AMQP communictions,<br>which passes recieved messages to other threads for procesing.<br><br>David<br><br>-- <br>David Wragg<br>Staff Engineer, RabbitMQ<br>SpringSource, a division of
 VMware<br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com" href="mailto:rabbitmq-discuss@lists.rabbitmq.com">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></div></div>
</div><br>

      </body></html>