activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivanrc <iri...@indra.es>
Subject Re: What is the function of destinationPolicy?
Date Fri, 19 Oct 2007 11:08:42 GMT



James.Strachan wrote:
> 
> To attach different policies to destinations :)
> 
> On 18/10/2007, ivanrc <iriano@indra.es> wrote:
>>
>> Hi,
>>
>>  Is DestinationPolicy for durable or  Non-durable Consumers or both?
> 
> Is for destinations, not for consumers.
> 
> 
>> I have got this in my config file but neither
>> timedSubscriptionRecoveryPolicy  nor oldestMessageEvictionStrategy work.
> 
> How can you be sure?
> 
> e.g. recovery policy on topics only works for retroactive consumers -
> are you setting that flag on your consumer?
> http://activemq.apache.org/retroactive-consumer.html
> 
> and evictionStrategy stuff only works *after* the prefetch buffer is
> filled - so I'd recommend setting your prefetch low or using tons of
> messages if you're testing out your config.
> http://activemq.apache.org/what-is-the-prefetch-limit-for.html
> 
>>
>> <destinationPolicy>
>>       <policyMap><policyEntries>
>>           <policyEntry topic=">">
>>                 <messageEvictionStrategy>
>>                         <oldestMessageEvictionStrategy/>
>>                 </messageEvictionStrategy>
>>             <dispatchPolicy>
>>               <strictOrderDispatchPolicy />
>>             </dispatchPolicy>
>>             <subscriptionRecoveryPolicy>
>>               <timedSubscriptionRecoveryPolicy recoverDuration="60000" />
>>             </subscriptionRecoveryPolicy>
>>
>>           </policyEntry>
>>       </policyEntries></policyMap>
>>     </destinationPolicy>
>>
>> I have a cluster with two brokers
> 
> By cluster you mean master/slave right?
> 
>> With durable consumers, I stop the consumer, and restart it after 5
>> minutes.
>> I think that with timedSubscriptionRecoveryPolicy set in 60 seconds, I
>> only
>> should recovered the last 60 seconds, but I recover all (all mensajes
>> sended
>> since customer stop).
> 
> subscription recovery is only for non-durable consumers. For durable
> consumers they are kept forever; there is no timeout.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source SOA
> http://open.iona.com
> 
> 


Thank you. I am not setting the consumer retroactive flag jeje.

-- 
View this message in context: http://www.nabble.com/What-is-the-function-of-destinationPolicy--tf4647859s2354.html#a13292367
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message