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 Tue, 14 Jul 2009 15:52:40 GMT

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 <knitheshshetty@yahoo.com> wrote:


From: Nithesh Shetty <knitheshshetty@yahoo.com>
Subject: Re: localqueue get
To: users@qpid.apache.org
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 <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