You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by siick <si...@protonmail.ch> on 2018/07/10 14:22:02 UTC

Problem to understand and apply auto delete of messages in queues

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

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

Posted by Tim Bain <tb...@alumni.duke.edu>.
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 <si...@protonmail.ch> 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
>