[rabbitmq-discuss] rabbitmq-c: Nonblocking recv
alan.antonuk at gmail.com
Sat Feb 18 00:44:11 GMT 2012
You need to have the FD_ZERO() and FD_SET() inside the do loop. select()
clears the fd_set if nothing has been seen on a socket.
On Fri, Feb 17, 2012 at 1:06 AM, Arun Chandrasekaran <visionofarun at gmail.com
> Hi Alan,
>> Brief glance at the code - it looks good to me, except for the
>> FD_SET(...) line which seems to have an extra ) after the sock variable.
>> I would uncomment the line you have commented. Its likely that if you run
>> this program after amqp_producer.c program, that a frame or two is cached
>> and that the result of amqp_frames_enqueued() is returning true
> Thanks, I've done that. But I may be missing something here. So I've
> attached the hg diff to make sure the changes are in the right place for
> the non-blocking consumer.
>> Also check with the management plugin see if there is a message in the
>> queue ready to be consumed.
> Currently I run on RHEL5. So I'll have to install the latest Erlang, I'll
> do that today. Alternatively I have made sure that the message is ready to
> be consumed by starting the consumer ahead of the producer. Will that
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss