yea, currently the expiry is overridden before the message is sent to the DLQ. That could be made configurable which would help. I wonder, would it make sense to reset the expiry or just set it to represent any remaining time. If that is the best solution for you, please raise a jira issue to track it.
Do you really want a DLQ at all, a null strategy in a policy entry will result in no dispatch to the DLQ. Also, take a look at the dlq discarding plugin added via http://issues.apache.org/activemq/browse/AMQ-1892 It overrides the sendToDLQ broker operation to make it more configurable. 2009/12/10 Fred Moore <fred.moor...@gmail.com> > Bruce, All, > > thanks for the answer, that almost solved my problem indeed. > > There is a additional aspect which is still unsolved and is related to > "poison pill" messages that end up in DLQ *before* their expiration time is > reached... > > In fact when these messages land in DLQ the expiration is reset to "never" > (while the original expiration details are stored in originalExpiration) > and > thus they become non disposble waste: which in a highly unattended system > should be avoided. > > Is there a way of letting DLQ-ed poison pill messages expire? > > Cheers, > F. > > > > On Fri, Dec 4, 2009 at 8:36 PM, Bruce Snyder <bruce.sny...@gmail.com> > wrote: > > > On Fri, Dec 4, 2009 at 9:38 AM, Fred Moore <fred.moor...@gmail.com> > > wrote: > > > Hi folks, > > > > > > this is probably easy but we not able to figure it out: we have > producers > > > setting msg expiration and msgs ending up in DLQ upon expiration (with > > their > > > expiration reset to "never"). > > > > > > How can I set things up in a way such that expired msgs will simply > > > disappear for good automatically (without going into a DLQ together > with > > > msgs discarded for more unexpected reasons)? > > > > Just to clarify, I think you're asking for expired messages to simply > > be discarded instead of being sent to the DLQ. To achieve this, you'll > > need to set the processExpired property to false in the dead letter > > strategy. Below is an example of how to configure this in the > > activemq.xml: > > > > <destinationPolicy> > > <policyMap> > > <policyEntries> > > <!-- Set the following policy on all queues using the '>' wildcard > --> > > <policyEntry queue=">"> > > <!-- Tell the dead letter strategy not to process expired messages > > so that they will just be discarded --> > > <deadLetterStrategy processExpired="false" /> > > </policyEntry> > > </policyEntries> > > </policyMap> > > </destinationPolicy> > > > > Bruce > > -- > > perl -e 'print > > unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" > > );' > > > > ActiveMQ in Action: http://bit.ly/2je6cQ > > Blog: http://bruceblog.org/ > > Twitter: http://twitter.com/brucesnyder > > > -- http://blog.garytully.com Open Source Integration http://fusesource.com