Hi, I’m interested in the feature “Batch Consumer” offered by SJMS.
By looking at the code, I noticed that the commit of the JMS session is done in the completion of the last exchange of the batch (/org.apache.camel.component.sjms.tx.SessionBatchTransactionSynchronization.java/) Does SJMS Consumer support a route with the Aggregation Pattern? I’ll explain you my concern: When an exchange comes into an aggregate, a copy of this exchange is done and the original exchange continues its processing. When the processing of the original exchange is finished, its completion will be executed. So with the SJMS component, the completion of the last exchange of the batch might occurs before the aggregated message finishes its processing. So even if the aggregated exchange fails, the JMS session is already committed and messages are lost. Is it right? Or does the thread executes first the processing inside aggregate before executing the processing of the last exchange? Another question is about the timeout that’ll trigger the commit of the JMS session. It seems that when the timeout occurs, it tries to commit the session directly (/org.apache.camel.component.sjms.tx.SessionBatchTransactionSynchronization.java – line 136/), no matter if the exchange is still inflight. What happens if the exchange is still inflight and an exception occurs after the JMS session is committed (due to the timeout)? I hope someone can clarify these concerns with me :). Thank you, Flo -- View this message in context: http://camel.465427.n5.nabble.com/SJMS-implementation-Batch-Consumer-tp5741291.html Sent from the Camel Development mailing list archive at Nabble.com.