How to retrieve message after last retry in a JMS, ActiveMQ and SimpleMessageListenerContainer setup?

675 Views Asked by At

I have a Spring JMS, ActiveMQ setup where I use SimpleMessageListenerContainer which I associated with POJO message listener. I have defined a RedeliveryPolicy where if there are exceptions in POJO message listener the message is send to DLQ after 4 tries. I would like to have access the message after the retries are exhausted, is it possible to with SMLC? What about DefaultMessageListenerContainer?

1

There are 1 best solutions below

4
On BEST ANSWER

You need another container listening on the DLQ.

Or you can use JmsTemplate.receive() on the DLQ to get them on-demand.