And what's the best way to set it on a per Destination basis?
Thanks a lot,
Andrew


-----Original Message-----
From: Rob Davies [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2008 12:34 AM
To: [email protected]
Subject: Re: How do I set the subscription recovery policy ?


Each subscription policy is a bean in the package:  
org.apache.activemq.broker.region.policy
You set the recovery policy on a Destination Policy - which can be set  
for individual destinations.
Here's an example of setting the default policy (applicable to all  
destinations unless overridden) in java code:

        BrokerService broker = new BrokerService();

         FixedSizedSubscriptionRecoveryPolicy rc = new  
FixedSizedSubscriptionRecoveryPolicy();
         rc.setMaximumSize(16*1024);
         rc.setUseSharedBuffer(true);
         PolicyEntry policy = new PolicyEntry();
         policy.setSubscriptionRecoveryPolicy(rc);

         PolicyMap pMap = new PolicyMap();
         pMap.setDefaultEntry(policy);

         broker.setDestinationPolicy(pMap);
        broker.addConnector("tcp://localhost:61616");
        broker.start();

cheers,

Rob

On 26 May 2008, at 20:08, Andrew M wrote:

> Thanks but I'm looking for a way to set it in the java code.  I'm  
> not using
> any xml config files.
> -Andrew
>
>
> -----Original Message-----
> From: ttmdev [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 25, 2008 1:54 PM
> To: [email protected]
> Subject: Re: How do I set the subscription recovery policy ?
>
>
> There's an example towards the bottom of this page.
>
> http://activemq.apache.org/slow-consumer-handling.html
>
> Joe
> Get your free ActiveMQ user guide at http://www.ttmsolutions.com
>
>
>
> Andrew M-2 wrote:
>>
>> How do I set the subscription recovery policy options at the bottom  
>> of
>> this
>> page?
>>
>>
>>
>> http://activemq.apache.org/subscription-recovery-policy.html
>>
>>
>>
>> Can someone give me an example URL to use in the java code?  I'm  
>> not using
>> any XML config files.
>>
>>
>>
>>
>>
>>
>>
>> Thanks..
>>
>>
>>
>>
>>
>
> -- 
> View this message in context:
>
http://www.nabble.com/How-do-I-set-the-subscription-recovery-policy---tp1745
> 4610s2354p17461079.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


Reply via email to