You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Andrew M <an...@oc384.net> on 2008/05/25 07:07:56 UTC
How do I set the subscription recovery policy ?
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..
RE: How do I set the subscription recovery policy ?
Posted by Andrew M <an...@oc384.net>.
And what's the best way to set it on a per Destination basis?
Thanks a lot,
Andrew
-----Original Message-----
From: Rob Davies [mailto:rajdavies@gmail.com]
Sent: Tuesday, May 27, 2008 12:34 AM
To: users@activemq.apache.org
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:joe.fernandez@ttmsolutions.com]
> Sent: Sunday, May 25, 2008 1:54 PM
> To: users@activemq.apache.org
> 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.
>
>
Re: How do I set the subscription recovery policy ?
Posted by Rob Davies <ra...@gmail.com>.
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:joe.fernandez@ttmsolutions.com]
> Sent: Sunday, May 25, 2008 1:54 PM
> To: users@activemq.apache.org
> 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.
>
>
RE: How do I set the subscription recovery policy ?
Posted by Andrew M <an...@oc384.net>.
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:joe.fernandez@ttmsolutions.com]
Sent: Sunday, May 25, 2008 1:54 PM
To: users@activemq.apache.org
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.
Re: How do I set the subscription recovery policy ?
Posted by ttmdev <jo...@ttmsolutions.com>.
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---tp17454610s2354p17461079.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.