Problem to understand and apply auto delete of messages in queues

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem to understand and apply auto delete of messages in queues

siick
Hi everybody.
I'm kind of new in ActiveMQ and i want to change our configuration to
automatically delete our messages after a period of X days.
Actually we have a topic where the message is sent, after 4 retry, it goes
to the DLQ.
So then i want that after X days, all pending messages in the DLQ have to be
deleted automatically.
I have read that page
http://activemq.apache.org/message-redelivery-and-dlq-handling.html and try
to modify my configuration in activemq.xml.

I added :

    <policyEntry queue=">">
        <deadLetterStrategy>
            <sharedDeadLetterStrategy processExpired="true" expiration="60"
processNonPersistent="true"/>
        </deadLetterStrategy>
     </policyEntry>


But i still see my pending messages in DLQ even after 60 seconds. Maybe i
miss something. I have uploaded my full activemq.xml if you need it.
activemq.xml
<http://activemq.2283324.n4.nabble.com/file/t379126/activemq.xml>  
I also want to know, in Topics, i see numbers of messages enqueued, are they
still on disk and could be retrieved or it's just an info number and theses
messages or not readable anymore?

Thank in advance you for your future answers.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Problem to understand and apply auto delete of messages in queues

Tim Bain
Please read the red box in the "Setting Expiration on Messages in the DLQ"
section on that page. It seems like that's exactly what you've done, since
you're using a '>' wildcard. Try using a more restrictive wildcard that
doesn't match the DLQ and see if it behaves as you expect.

Tim

On Tue, Jul 10, 2018, 8:22 AM siick <[hidden email]> wrote:

> Hi everybody.
> I'm kind of new in ActiveMQ and i want to change our configuration to
> automatically delete our messages after a period of X days.
> Actually we have a topic where the message is sent, after 4 retry, it goes
> to the DLQ.
> So then i want that after X days, all pending messages in the DLQ have to
> be
> deleted automatically.
> I have read that page
> http://activemq.apache.org/message-redelivery-and-dlq-handling.html and
> try
> to modify my configuration in activemq.xml.
>
> I added :
>
>     <policyEntry queue=">">
>         <deadLetterStrategy>
>             <sharedDeadLetterStrategy processExpired="true" expiration="60"
> processNonPersistent="true"/>
>         </deadLetterStrategy>
>      </policyEntry>
>
>
> But i still see my pending messages in DLQ even after 60 seconds. Maybe i
> miss something. I have uploaded my full activemq.xml if you need it.
> activemq.xml
> <http://activemq.2283324.n4.nabble.com/file/t379126/activemq.xml>
> I also want to know, in Topics, i see numbers of messages enqueued, are
> they
> still on disk and could be retrieved or it's just an info number and theses
> messages or not readable anymore?
>
> Thank in advance you for your future answers.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>