You should put expiration time on the messages sent to the DLQ. BTW you don't need to handle redelivery and DLQ manually, broker can do that for you
http://activemq.apache.org/message-redelivery-and-dlq-handling.html Regards -- Dejan Bosanac - http://twitter.com/dejanb ----------------- The experts in open source integration and messaging - http://fusesource.com ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Fri, Jan 20, 2012 at 1:46 PM, Ishitori <[email protected]> wrote: > I have a queue where I store messages without expiration time. A consumer > process messages, but it is okay that it can't successfully process them > from the first try. If processing failed I resend message to the same queue > with a delayed delivery (using scheduler). If a message can't be processed > after 5 tries I send it to a queue with a "DLQ.' prefix. So I create DLQ by > myself via sending messages to queue with the name > "DLQ.<initial_queue_name>" > > I want to save messages in "DLQ." for monitoring reasons, but I want to > store only "fresh" unprocessed messages. Can I configure broker in the way > so it would automatically delete messages from that DLQ which are older > than > 15 days? > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/How-to-automatically-remove-messages-from-DLQ-tp4313129p4313129.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
