Hi, the listener sample has the following settings; SubscriptionManager subscriptions(session); SubscriptionSettings settings; settings.exclusive = false; setting.flowControl = FlowControl::messageWindow(1); settings.acceptMode = ACCEPT_MODE_EXPLICIT; settings.acquireMode = ACQUIRE_MODE_PRE_ACQUIRED; LocalQueue local_queue; subscriptions.subscribe(local_queue, "RMS", settings, "rmsset"); Message message;local_queue.get(message, 10); Now even after the depth of queue is more than 20 i have experiencedthat get gives an exception saying queue is empty is there any particular reason for that or again any change in the configuration. Awaiting your reply. Regards, Nithesh
--- On Mon, 7/13/09, Nithesh Shetty <[email protected]> wrote: From: Nithesh Shetty <[email protected]> Subject: Re: localqueue get To: [email protected] Date: Monday, July 13, 2009, 1:14 PM hi, the listener sample has the following settings; SubscriptionManager subscriptions(session); SubscriptionSettings settings; settings.acceptMode = ACCEPT_MODE_EXP; settings.acquireMode = ACQUIRE_MODE_PRE_ACQUIRED; LocalQueue local_queue; subscriptions.subscribe(local_queue, "RMS", settings, "rmsset"); Message message = local_queue.get(); before getting the message i put a breakpoint over here and i execute another exe to get the message(timeout infinity) but it hangs till the above code gets the message and closes the connection. Awaiting your reply. Nithesh --- On Mon, 7/13/09, Gordon Sim <[email protected]> wrote: From: Gordon Sim <[email protected]> Subject: Re: localqueue get To: [email protected] Date: Monday, July 13, 2009, 11:34 AM Nithesh Shetty wrote: > the listener sample has the following settings; > SubscriptionManager subscriptions(session); > SubscriptionSettings settings; > settings.acceptMode = ACCEPT_MODE_NONE; > settings.acquireMode = ACQUIRE_MODE_PRE_ACQUIRED; > LocalQueue local_queue; > subscriptions.subscribe(local_queue, "RMS", settings, "rmsset"); > Message message = local_queue.get(); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%% > now the problem is if i put ten message in the queue and get one message and >then close > the connection the rest of the nine message gets dequeued... ACCEPT_MODE_NONE means that the broker will dequeue the message as soon as it is delivered. As you are using the default flow control settings for your client, the broker will send as many messages to the client as it can, regardless of whether the client application has received the earlier messages. If you want the transfer from broker to subscribers to be reliable, use ACCEPT_MODE_EXPLICIT. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
