[rabbitmq-discuss] Why is the "select" always getting timed out in consumer?

Michael Klishin mklishin at gopivotal.com
Fri Dec 13 14:58:25 GMT 2013


On 13 Dec 2013, at 18:41, kingsmasher1 <raj.kumar.sanpui at gmail.com> wrote:

> In short, i am trying to design a non-blocking consumer, by using the
> "select" which looks if the file descriptor is readable (or in short, if
> there is any message available in the queue).

select(2) will not indicate that there are messages in the queue. It will indicate
when there’s data available to read on the socket.

basic.get will return basic.get-empty when there are no messages to fetch.
Do you use basic.get in your code? (I’m not familiar with librabbitmq-c to tell if it
supports basic.consume)

Are you sure that messages are actually routed to the queue? (use Management UI to find this out)
Is there any data flowing from RabbitMQ to your process?

Finding answers to these 3 questions will greatly narrow down search space.

MK

Software Engineer, Pivotal/RabbitMQ




More information about the rabbitmq-discuss mailing list