qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nithesh Shetty <knitheshshe...@yahoo.com>
Subject Re: localqueue get
Date Mon, 13 Jul 2009 13:14:08 GMT
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 <gsim@redhat.com> wrote:


From: Gordon Sim <gsim@redhat.com>
Subject: Re: localqueue get
To: users@qpid.apache.org
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:users-subscribe@qpid.apache.org




      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message