[rabbitmq-discuss] asynchronous fetching messages from rabbitMQ queues
Matthias Radestock
matthias at rabbitmq.com
Thu Nov 10 06:13:53 GMT 2011
On 10/11/11 05:08, pavuuu wrote:
>
> If there are no messages to be dequeued, the call has to get blocked till a
> message arrives.
>
> If there are messages (say only 10) in the queue the call should not get
> blocked until it reaches the prefetch(say 100 messages).
So you want a DequeueEverythingButWaitIfThereIsNothingThere() ?
That should be straightforward to implement as a helper function. We
could add it to the library, but I am curious about the use case here -
I would have thought that most apps process messages individual rather
than in blocks.
Btw, you do realise that the Dequeue() operation is client-side only,
right? i.e. it is simply manipulating a client side buffer which is
filled as and when the client receives a message from the server.
Matthias.
More information about the rabbitmq-discuss
mailing list