I'd like to have your opinion about the following:
In a certain flow I don't want to loose any message.
The message is send by an application that can't resend the message. The message is validated in my bundle and content is - after transformation - inserted into a database.
What if the database connection fails? The routebuilder will raise an errormessage (in the logfile), but my message is gone.
Would you advice to build an error handler that inserts the errormessage and the original message into an error database? A retry-component could for example poll on the same database. If the status of the message is 'RETRY', the message could be picked up by that retry-component and offered to the bus again.
Or how would you do this?
You can watch an archived webinar on flows/transactions here (title of webinar is Transactions and Clustering in ServiceMix):
The webinar presents several options. Perhaps you wish to use XA transactions which can perform rollback and retry for you.