<div dir="ltr">Antony;<div><br></div><div style>rabbitmq-c has very recently added an API that allows for specifying a timeout when waiting for frames from the broker (see�<a href="https://github.com/alanxz/rabbitmq-c/blob/master/librabbitmq/amqp.h#L495">https://github.com/alanxz/rabbitmq-c/blob/master/librabbitmq/amqp.h#L495</a>�). �With this API is possible to implement something with a similar effect.</div>
<div style><br></div><div style>I will warn you that this is only in the development branch and thus hasn&#39;t received the same amount of testing that tagged versions have, but I would encourage you to try it out and report back any issues that come up.</div>
<div style><br></div><div style>-Alan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 25, 2013 at 4:56 AM, antony <span dir="ltr">&lt;<a href="mailto:antony.pulicken@gmail.com" target="_blank">antony.pulicken@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
This is my scenario:<br>
<br>
I have multiple instances of listeners waiting on different temp queues. In<br>
some of the cases, there won&#39;t be any messages published to these temp<br>
queues and I want these listeners to timeout so that it can free up the<br>
connections.<br>
<br>
I guess in Java, we can achieve this by using the overloaded method in the<br>
QueueingConsumer class that takes timeout as a parameter as shown below:<br>
<br>
<br>
/QueueingConsumer.Delivery delivery = null;<br>
long timeout = 2 * 60 * 1000; // 2 minutes in milliseconds<br>
delivery = queuingConsumer.nextDelivery(*timeout*);<br>
if (delivery == null) {<br>
� // shut down your consumer here - no events arrived<br>
� // before the timeout was reached<br>
}<br>
else {<br>
� // process the delivered message here<br>
}/<br>
<br>
<br>
1) Does RabbitMQ C client also has a similar feature ?<br>
<br>
2) Are there better approaches to handle this timeouts ?<br>
<br>
Please let me know.<br>
<br>
Thanks and Regards,<br>
Antony.<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-Consumer-timeout-tp27590.html" target="_blank">http://rabbitmq.1065348.n5.nabble.com/RabbitMQ-Consumer-timeout-tp27590.html</a><br>
Sent from the RabbitMQ mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a 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>
</blockquote></div><br></div>