activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From darrickc <darricks...@gmail.com>
Subject Re: Is it possible to setup lastImageSubscriptionRecoveryPolicy without activemq.xml configuration.
Date Fri, 10 Apr 2009 20:20:29 GMT

I think I may have figured it out... Here is how you setup your broker with
LastImage subscription policy. Right now this "works"... it seems like when
I subscribe I'm getting back 2 messages instead of just 1, not sure why:

broker = new BrokerService();
PolicyMap policyMap = new PolicyMap();
PolicyEntry policy = new PolicyEntry();
policy.setSubscriptionRecoveryPolicy(new
LastImageSubscriptionRecoveryPolicy());
policyMap.setDefaultEntry(policy);
broker.setDestinationPolicy( policyMap );

Then when you subscribe use ?consumer.retroactive=true at the end of your
topic string.


darrickc wrote:
> 
> Currently I am using activemq without the activemq.xml config file. I
> would like to use the lastImageSubscriptionRecoveryPolicy feature with my
> retroactive subscription without using the configuration file. Is this
> possible? I'm thinking maybe tacking on something like
> "?consumer.retroactive=true+lastImageSubscriptionRecoveryPolicy" or
> something similar in the topic. Is there anyway to get
> lastImageSubscriptionRecoveryPolicy to work without the activemq.xml
> config file?
> 
> Thanks!
> 

-- 
View this message in context: http://www.nabble.com/Is-it-possible-to-setup-lastImageSubscriptionRecoveryPolicy-without-activemq.xml-configuration.-tp22915713p22993713.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message