You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Nithesh Shetty <kn...@yahoo.com> on 2009/07/08 12:10:27 UTC

Acquire Mode

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. 
 
or is there any other way.
 
regards,
 
Nithesh
 
 
 


      

Re: Acquire Mode

Posted by Gordon Sim <gs...@redhat.com>.
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:users-subscribe@qpid.apache.org