activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moore <fred.moor...@gmail.com>
Subject Re: How can we obtain automatic removal of expired messages from queues?
Date Thu, 10 Dec 2009 09:02:58 GMT
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.snyder@gmail.com> wrote:

>  On Fri, Dec 4, 2009 at 9:38 AM, Fred Moore <fred.moore77@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)U8V4\@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message