This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In our system, whenever a JMS message procesing from a queue fails due to an application exception, the message is put on a different queue (error queue). It is observed that some of the failed messages are poision messages due to bad format that need manual fix and resent to the queue. The queues are durable and have an entry in the database table for each JMS message.
What are the ways to handle poision messages - Is there a way to store the message in the error queue itself without being reprocessed by the Spring Message driven pojo (MDP) by setting any flag/status on the message/session/connection?
Or is it better to store the message in a database table for further analysis and resend the message to the queue after it is corrected?