Using a plain Connection Factory, without pooling and transactions, for Camel ActiveMQ endpoint creates many connections
Issue
- With this configuration I see a connection being created and torn down to broker1 (every second or so) even though no message are being processed. I suspect this is to do the transaction manager opening and closing connections to begin/commit transactions.
camel route
<camelContext id="transactionTestContext" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="mq-tx-broker1:queue:input?acknowledgementModeName=SESSION_TRANSACTED&disableReplyTo=true&preserveMessageQos=true&concurrentConsumers=1&maxConcurrentConsumers=1&IdleTaskExecutionLimit=1&maxMessagesPerTask=1"/>
<to uri="mq-broker2:queue:output.GW02?preserveMessageQos=true&includeSentJMSMessageID=true" id="to9"/>
</route>
</camelContext>
camel-jms config for broker 1
<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61610"/>
<property name="userName" value="admin" />
<property name="password" value="admin" />
</bean>
<bean id="mq-tx-broker1-config"
class="org.apache.activemq.camel.component.ActiveMQConfiguration">
<property name="connectionFactory" ref="jmsConnectionFactory" />
<property name="transacted" value="true">
<property name="cacheLevelName" value="CACHE_CONSUMER">
</bean>
Environment
JBoss A-MQ 6.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
