[openamq-dev] amq_client_session_basic_consume_nowait() semantics
Martin Sustrik
sustrik at imatix.com
Sun May 11 08:58:43 CEST 2008
Hi,
The same applies to all functions ending with _nowait:
Normal function (without _nowait) sends request to the broker, then
client waits for confirmation from broker and exits. The problem is that
invoking a lot of functions this way is time consuming. Each of them
requires a network roundtrip.
Thus, _nowait is intended to make the process fast. Request is send to
broker and function exits immediately without waiting for the response
from the broker - actually, the response is not even generated by the
broker.
Hope this helps.
Martin
Caciano Machado wrote:
> Hi,
>
> Anyone could explain the semantics of the function
> amq_client_session_basic_consume_nowait(). I can't find anything in
> the documentation.
>
> In the code amq_client_session_basic_consume calls
> "s_wait_for_methods" with the last argument set to TRUE and
> amq_client_session_basic_consume_nowait calls it with the argument set
> to FALSE. What is the difference between these functions?
>
>
> amq_client_session_basic_consume (...) {
> ...
> s_wait_for_methods (self, self->connection->timeoif
> (s_wait_for_methods (self, self->connection->t|>ut, TRUE)
> ...
> }
>
> amq_client_session_basic_consume_nowait (...) {
> ...
> s_wait_for_methods (self, self->connection->timeoif
> (s_wait_for_methods (self, self->connection->t|>ut, FALSE)
> ...
> }
>
> Regards,
> Caciano
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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