[openamq-dev] A try version of amq_client_session_wait?

Pieter Hintjens ph at imatix.com
Thu May 21 00:38:54 CEST 2009


Ryan,

Yes, it would be possible to make a method that did what wait() did,
except the wait part.  That is, wait() is responsible for shoving
arrived and returned messages onto their respective lists.  So we
could add a method that shoves any messages already arrived, but does
not wait for new ones if there are none.

It would be a useful addition, I think.  Please make a change request
on www.openamq.org, so that it does not get lost.

-Pieter


On Wed, May 20, 2009 at 9:29 PM, Ryan <something.ryan0 at gmail.com> wrote:
> I have been using OpenAMQ for a bit and have noticed that for every message
> to be received it seems like there must be a corresponding call to
> amq_client_session_wait. In the code I have there are other things being
> done in the loop that is making this call and I was wondering if there was
> some form of the amq_client_session_wait call with a non-existant timeout
> that would simply return if there were no messages (not wait forever) to
> improve the performance and not have to wait at least 1ms when no message is
> available. Does a function exist for this purpose? Or should calling
> amq_client_session_wait queue up all of the outstanding messages so that
> repeatedly calling amq_client_session_basic_
> arrived (or amq_client_session_basic_returned) would return subsequent
> messages without the requirement of having a call to amq_client_session_wait
> in between?
>
> Ryan
>
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev
>


More information about the openamq-dev mailing list