posted 8 years ago
I got the fix. I was catching the exception in catch block which I understood should not be. If I throw the exception from Catch Block, the message is going to DLQ after respective retries.
Please advise how could the below requirements be accomplished through ActiveMQ and Spring JMS.
A) I want to push the messages into DLQ only when respective exception occurs. Currently as per my understanding, any exceptions thrown from Message Listeners are moved to DLQ after specified retry parameters.
B) Could I control the like No-Retry for custom exceptions. For example, if there is an Instance of MyException class thrown, I should not retry those messages such that it should not even go to DLQ.