On 25/07/12 11:59, Gordon Sim wrote:
On 07/25/2012 08:19 AM, Toralf Lund wrote:
The problem appears to be that I call
qpid::Messaging::session::acknowledge() every time a new message has
been received. If I just comment out this call, I can read all the 1288
messages that are currently sitting on my queue in something like 175
ms...
So, I suppose I still don't quite understand how the acknowledgement
logic works. I mean, isn't it supposed to be possible to acknowledge
messages as they are received? Maybe it's right to just leave out the
call in any case, when browsing the messages via "mode: browse" in
receiver arguments?
Certainly the acknowledge call isn't needed in the browse case.
OK.
Also acknowledging each message individually is less optimal than
acknowledging in batches (say every 20 messages or so). I'm still
rather surprised at how slow it was in the original form.
I believe I have found the actual root of the problem now - there was
also a Session::sync() call for every message received, which I somehow
overlooked earlier, and had quite forgotten that I inserted at some
stage as a part of some kind of experiment... I suppose that without the
acknowledge calls this would just exit directly as there was nothing to
sync, but with the calls in place, it would wait for each
acknowledgement to reach the server (like when you pass "true" for the
"block" parameter.) I guess this is expected to take as long as what I'm
seeing? Anyhow, I can easily move the call so that it gets executed
every second or two when I let the message receive loop exit to do
various checks and household tasks, rather than once for every message,
but I'm also sort of wondering if there is a need to synchronise
explicitly at all.
Thanks again,
- Toralf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org
This e-mail, including any attachments and response string, may contain
proprietary information which is confidential and may be legally privileged. It
is for the intended recipient only. If you are not the intended recipient or
transmission error has misdirected this e-mail, please notify the author by
return e-mail and delete this message and any attachment immediately. If you
are not the intended recipient you must not use, disclose, distribute, forward,
copy, print or rely on this e-mail in any way except as permitted by the author.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org