qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Schloming <...@alum.mit.edu>
Subject Re: Non blocking receive qpid proton
Date Tue, 16 Apr 2013 14:03:35 GMT
I'm a little confused by your question. Awakening only when a new message
is added to the incoming queue sounds more like a blocking than a
non-blocking receive.

That said, you can certainly poll rather than block if you wish. Assuming
you're using messenger, you can set the timeout of the messenger to zero.
This will cause receive to return immediately rather than block waiting for
incoming messages. You can then check to see if any messages were actually
received by checking the size of the incoming queue.

Hope this helps. If you describe a bit more about what you're trying to do
then I might be able to give you a better answer.


On Tue, Apr 16, 2013 at 9:39 AM, Maki Camara <Maki.Camara@etu.enseeiht.fr>wrote:

> Hi,
> I would like to know if there is any means to do an non-blocking receive,
> I mean I would like to be able to avoid the loop{while(true) as shown in
> qpid proton examples} when listening,
> I want my process awaken only when a new message is added in the incoming
> queue.
> Thank you for your response
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<users-unsubscribe@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message