camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From flovansi <>
Subject SJMS implementation - Batch Consumer
Date Thu, 10 Oct 2013 13:16:48 GMT

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

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
It seems that when the timeout occurs, it tries to commit the session
– 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,


View this message in context:
Sent from the Camel Development mailing list archive at

View raw message