activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <>
Subject Re: How can we obtain automatic removal of expired messages from queues?
Date Fri, 04 Dec 2009 19:36:29 GMT
On Fri, Dec 4, 2009 at 9:38 AM, Fred Moore <> 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

      <!-- 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" />

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:

View raw message