On 01/12/2010 07:26 AM, denny86 wrote:
Gordon Sim wrote:
If not can you try the attached test program? It will listen for a
configurable number of messages on queues a, b and c (all bound to
amq.fanout for convenience). I can consume 10 million messages from each
queue without seeing any issue (neither crashes nor memory growth) on
linux.
Your program works fine. For ACCEPT_MODE_EXPLICIT and
ACQUIRE_MODE_PRE_ACQUIRED, you didnt call messageAccept() explicitly. So its
not required right?
Right. ACCEPT_MODE_EXPLICIT only means that the *broker* expects
explicit accepts (and thus ensures that transfer is reliable). The
autoAck setting can be used to tell the client library to send the
accept automatically during dispatch.
I confirmed with queue-stats tool, its reporting max
queue depth of 1 in cases.
I removed this call from my original program and it works great. So far, no
crash& memory is stable.
So the crash was happening when you were manually accepting. Was autoAck
set to 0 or left as the default value?
For reliability considerations, does ACCEPT_MODE_EXPLICIT and
ACQUIRE_MODE_NOT_ACQUIRED score over ACCEPT_MODE_EXPLICIT and
ACQUIRE_MODE_PRE_ACQUIRED.
No, in each case the transfer is reliable. I would recommend the latter
option unless there was a clear reason not to.
In second case, program crashes and also
processing is slower compared to former.
Really? I would have expected that to be the other way round, i.e. for
the pre-acquired mode to be slower as there is an extra step and the
broker is a little less efficient on that mode.
However it shouldn't be crashing in that mode. I'll do some
investigation...
Well i guess its kinda of
Speed-reliability trade-off situation
The not-acquired mode with manual acquire doesn't give you more
'reliability'.
thanks for the insight, Gordon. :clap:
Good to hear you've got something working that you are happy with.
Thanks for all the feedback!
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]