I have a few routes that read messages from JMS queue, do some transforms etc, and send them to another JMS queue.
I tried testing my route while transacted and not in error situations, but it seems to be working as if it was transacted in any case...? Documentation at http://camel.apache.org/transactional-client.html states that "Configuration of Redelivery: The redelivery in transacted mode is not handled by Camel but by the backing system (the transaction manager). In such cases you should resort to the backing system how to configure the redelivery." and it looks like this happens whether I configure my route transacted or not. When I throw an exception in my processing, it looks like ActiveMQ's redelivery mechanism take place regardless of my own ErrorHandler and the message ends up in the ActiveMQ.DLQ queue. I tried to explicitly set transactions off for my route by defining them with PROPAGATION_NEVER but this results in "Existing transaction found for transaction marked with propagation 'never'" Does Camel work so that a route which reads from JMS is automatically transactional, regardless of <transactional>? My route and transactions config (for testing WITHOUT transactions): <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="transacted" value="false" /><!-- this is true when testing with transactions on, also reference to txManager exists then --> <property name="connectionFactory" ref="jmsConnectionFactory" /> </bean> <bean id="txManager" class="org.springframework.jms.connection.JmsTransactionManager"> <property name="connectionFactory" ref="jmsConnectionFactory" /> </bean> <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="${activemq.brokerurl}" /> </bean> <bean id="never" class="org.apache.camel.spring.spi.SpringTransactionPolicy"> <property name="transactionManager" ref="txManager" /> <property name="propagationBehaviorName" value="PROPAGATION_NEVER" /> </bean> <!-- this does not seem to have any effect --> <errorHandler id="myErrorHandler" type="DeadLetterChannel" deadLetterUri="activemq://{{queue.transform.deadletters}}"> <redeliveryPolicy maximumRedeliveries="1" retryAttemptedLogLevel="WARN" backOffMultiplier="2" redeliveryDelay="15000" useExponentialBackOff="true" /> </errorHandler> <route> <from uri="activemq://{{queue.in}}" /> <transacted ref="never"/> <process ref="somethingWhichThrowsException" /> <from uri="activemq://{{queue.out}}" /> </route> This route seems to always go through the default ActiveMQ delivery (few deliveries, then move to ActiveMQ.DLQ) no matter what my transacted ref="" or ErrorHandler is. I am running this in ServiceMix/FuseESB environment, not sure if it has any relevance.
