I haven't used it personally, but on your last point around setting
expiration on DLQ messages...a quick google turned up this page
suggesting it can do that since 5.12.0:
https://activemq.apache.org/components/classic/documentation/message-redelivery-and-dlq-handling

Look for the section headed "Setting Expiration on Messages in the
DLQ" approaching half way down.

On Tue, 11 Mar 2025 at 13:07, Ephemeris Lappis
<ephemeris.lap...@gmail.com> wrote:
>
> Hello.
>
> I'm looking for a simple way to clean DLQ queues on our ActiveMQ brokers.
> Messages are moved to DLQ queues when some unexpected conditions lead
> consumers to fail. We've no automatic processing for DLQ messages that are
> only needed for diagnosis. Nevertheless, when the queues contain too many
> messages, the ActiveMQ console or alternative browsing tools are not able
> to handle them, and, by the way, thousands of messages are useless. This is
> why we're looking for a periodic cleaning. For example, we could remove all
> messages that are older than N days.
>
> A JMS selector can be used to check the JMSTimestamp is before a given
> time. But I can't find any way to write a route with a JMS 'from' statement
> that could evaluate something like : JMSTimestamp < NOW() - INTERVAL '7
> days'...
>
> I imagine that more complex solutions could be considered, consuming all
> the DLQ queues messages, and moving them to other queues with an expiration
> time, setting a policy to delete expired messages. But this is not our
> first choice...
>
> I've also searched for a way to force ActiveMQ to set an expiration time on
> all DLQ messages, but It seems it's not possible.
>
> Any ideas are welcome !
>
> Thanks in advance.
>
> Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org
For additional commands, e-mail: users-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to