qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: localqueue get
Date Mon, 13 Jul 2009 11:34:45 GMT
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:users-subscribe@qpid.apache.org


Mime
View raw message