To attach different policies to destinations :) On 18/10/2007, ivanrc <[EMAIL PROTECTED]> 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