[rabbitmq-discuss] Regarding the non-blocking call of "amqp_simple_wait_frame"

alex chen chen650 at yahoo.com
Tue Jan 18 23:48:26 GMT 2011


couple of months ago i submitted a patch to support read_timeout in rabbitmq-c.  

I remembered getting email from you about adding this patch to the src later.

attached please find the patch again.  it uses select() to timeout on read, so 
the wait_frame() would not block forever.
we have used it in production for 6 months without any problems.


From: David Wragg <david at rabbitmq.com>
To: Deepak Vijayvergiy <vdeepak at yahoo-inc.com>
Cc: "rabbitmq-discuss at lists.rabbitmq.com" <rabbitmq-discuss at lists.rabbitmq.com>
Sent: Mon, January 17, 2011 1:36:43 AM
Subject: Re: [rabbitmq-discuss] Regarding the non-blocking call of 

Hi Deepak,

Deepak Vijayvergiy <vdeepak at yahoo-inc.com> writes:
> I am implementing RabbitMQ-C client library in my c++ project and I
> have a question about the message reading from the queue.  We need to
> call the function amqp_simple_wait_frame(), and we are blocked here to
> get the result, and then return when we get the message.  Question is:
> Do you also have some other way in which we can read the message
> without blocking?

rabbitmq-c does not currently support non-blocking operation.  You could
use threads though: have one thread responsible for AMQP communictions,
which passes recieved messages to other threads for procesing.


David Wragg
Staff Engineer, RabbitMQ
SpringSource, a division of VMware
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110118/010ff33a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rabbitmq-c.patch
Type: text/x-patch
Size: 3998 bytes
Desc: not available
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110118/010ff33a/attachment-0001.bin>

More information about the rabbitmq-discuss mailing list