0
votes

I am trying to create a camel route having rabbitmq consumer inside a transaction.  I am using Spring boot and atomikos for tx management.  Rabbit MQ queue already has x-dead-letter-exchange and routing key set up. 

How should I wrap my rabbitmq connection factory inside JTA tx manager ? I tried transact block but it didn't work. Also I don't see an option in RabbitMq component to set tx manager.

1

1 Answers

0
votes

Wrap your rabbitMq connection factory inside of a Jms Component from camel. When using WebSphereMQ I typically have a wrapping pattern of: JmsComponent -> Spring CachingConnectionFactory -> MQQueueConnectionFactory. You can configure your transaction information on the JmsComponent.