Nithesh Shetty wrote:
Hi ,
I think i should rephrase my statement.
Is there any way to browse a queue for message ( after getting the message i will process the message ) and then delete the message.
Yes, you can have a subscription in NOT_ACQUIRED mode, then try to
acquire it and if successful accept it which will result in it being
dequeued.
You could have a look at Subscription::acquire() and
Subscription::getUnacquired(); if the acquire is successful the id is
removed for the unacquired set.
(You can of course also use Session::messageAcquire() directly. This
returns the set of messages actually acquired by the command).
regards,
Nithesh
--- On Wed, 7/8/09, Gordon Sim <[email protected]> wrote:
From: Gordon Sim <[email protected]>
Subject: Re: Acquire Mode
To: [email protected]
Date: Wednesday, July 8, 2009, 12:24 PM
Nithesh Shetty wrote:
Hi,
I there any way to change the acquiremode of a localqueue after subscribing
the queue to subscriptionManager . I mean SubscriptionSettings settings;
settings.acquiremode = ACQUIRE_MODE_PRE_ACQUIRE.
LocalQueue local_queue;
then u call subscribe(local_queue, queuename, settings);
now if i want to change settings i mean change the acquiremode to ACQUIRE_MODE_NOT_ACQUIRED then do i need to call subscribe function again with the change in settings to NOT_ACQUIRED.
Yes, you would. You are creating a new subscription. Note that if you are
finished with the first subscription (in ACQUIRE_MODE_PRE_ACQUIRE), you should
cancel that.
[Perhaps also worth pointing out that in PRE_ACQUIRE mode you can release
messages if you don't want them (this won't stop them being redelivered
however). And in NOT_ACQUIRED mode you can try to acquire received messages.]
or is there any other way.
regards,
Nithesh
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]