I am trying to figure out how to use a message-driven-channel-adapter with concurrent consumers and be able to withstand a system failure without losing any messages. In my current implementation I use Spring Integration and reading from an ArtemisMQ server and I need to be able to rollback any messages that fail to reach the end of the flow.
I do use the following implementation to receive messages
<int-jms:message-driven-channel-adapter
connection-factory="connectionFactory"
destination="myQueue"
message-converter="messageConverter"
channel="inputChannel"
concurrent-consumers="5"
error-channel="errorChannel"
acknowledge="transacted"
/>
but since multiple concurrent consumers are now involved transaction boundaries are now redefined and if a failure occurs then messages are lost.
My main issue is that I need multiple consumers serving messages and and at the same time I do not want to lose messages during a crash event. Is there a way to extend/propagate transaction boundaries or at least manually acknowledge each message on the end of my flow ?