Hi

That's indeed possible even if you make use of the *transactional* JMS.

I already verified it using one of the Camel's own unit tests (you could
also give it a try as well if you want).

I changed [1] as the following (note the newly introduced transacted() DSL):

from("activemq:queue:in1").transacted().resequence().body().batch().size(100).timeout(10000L).to("mock:result");
from("activemq:queue:in2").transacted().resequence().header("num").stream().timeout(2000L).to("mock:result");

And by [2] I marked the jmsConfig Bean to be *transacted*:

        <property name="transacted" value="true"/>

And as a side effect of this change I also had to add a Spring
PlatformTransactionManager:

    <bean id="transactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
    </bean>

So that you don't have to spawn your own threads or the like.

[1]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsResequencerTestRouteBuilder.java
[2]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/JmsResequencerTest-context.xml

Babak

--
View this message in context: 
http://camel.465427.n5.nabble.com/Resequencer-EIP-tp5482502p5482841.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to