<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. <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. 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 <david@rabbitmq.com><br><b><span style="font-weight: bold;">To:</span></b> Deepak Vijayvergiy <vdeepak@yahoo-inc.com><br><b><span style="font-weight: bold;">Cc:</span></b> "rabbitmq-discuss@lists.rabbitmq.com" <rabbitmq-discuss@lists.rabbitmq.com><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 <<a ymailto="mailto:vdeepak@yahoo-inc.com" href="mailto:vdeepak@yahoo-inc.com">vdeepak@yahoo-inc.com</a>> writes:<br>> I am implementing RabbitMQ-C client library in my c++ project and I<br>> have a question about the message reading from the queue. We need to<br>> call the function amqp_simple_wait_frame(), and we are blocked here to<br>> get the result, and then return when we get the message. Question is:<br>> Do you also have some other way in which we can read the message<br>> without blocking?<br><br>rabbitmq-c does not currently support non-blocking operation. 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>