Configuring a route with ActiveMQ to use transactions and durable subscription does not work, as it did not create a topic or subscriber, as shown in the following error log:
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer - Setup of JMS message listener invoker failed for destination 't.TestTopic' - trying to recover. Cause: You cannot create a durable subscriber without specifying a unique clientID on a Connection
The route works if you do not use either transactions or a durable subscription, but if you use both, the route does not work.
|Problem root cause||Spring-jms, which is used by Camel, does not allow you to create a durable subscription when the caching level is set below a specific value. By default, Camel uses caching level none when JMS transactions are turned on.|
|Solution or Workaround||To use both transactions and durable subscription, you must explicitly specify a caching level parameter in the cJMS advanced settings by adding the following:
"cacheLevelName" : "CACHE_CONSUMER"
|JIRA ticket number|