On 02/26/2010 08:56 AM, Gordon Sim wrote:
On 02/26/2010 10:13 AM, David Stewart wrote:
The session was synchronous. Using the AsyncSession brought the 75
seconds down to 5-10 which is a fantastic improvement.
The bottleneck still appears to be the SessionManager though.
SessionManager::subscribe() is synchronous, which will impact the rate.
One tip is to turn off message flow when you subscribe (use
SubscriptionSettings(FlowControl::messageWindow(0))) and then add credit
to resize the window on each subscription after you are set up
(Subscription::grantMessageCredit() or Session::messageFlow()) to enable
messages to flow (this can be asynchronous). I get through 20000 in ~25
secs on my laptop with that (see attached).
However can I ask why you need a separate queue per exchange? Could you
instead have one queue bound into each of the exchanges? That would be
far more efficient (both for setup and at runtime) and would still give
you all the messages sent to any of those exchanges.
That is probably a better solution than my patch for async subscribe.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]