On 08/03/2012 06:51 PM, Fraser Adams wrote:


subscription = subscriptions.subscribe(*this, queue,
  SubscriptionSettings(FlowControl::messageWindow(100),
  ACCEPT_MODE_NONE));
Unfortunately that setting just seemed to cause my consumer to hang
after getting the first 100 messages.

     subscription = subscriptions.subscribe(*this, queue,
SubscriptionSettings(FlowControl::messageWindow(100)));

seemed to work OK without growing memory. I've no idea why adding
ACCEPT_MODE_NONE should cause it to misbehave, it should have simply
removed the need to acknowledge should it not...

Sorry... one more complication with that combination... you will need to periodically call Session::sendCompletion(), certainly not less then every 100 messages. This is because if accepts are not required the auto-ack functionality is disabled and that is where the sendCompletion() is done autonatically. (Again, this is what you are avoiding by using the messaging API everyone! :-)

However, from the perspective of delivery records, if you set ACCEPT_MODE_NONE, you can leave the flow control as unlimited and you should still not build up any server side memory.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to