Using a plain Connection Factory, without pooling and transactions, for Camel ActiveMQ endpoint creates many connections

Solution Unverified - Updated -

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&amp;disableReplyTo=true&amp;preserveMessageQos=true&amp;concurrentConsumers=1&amp;maxConcurrentConsumers=1&amp;IdleTaskExecutionLimit=1&amp;maxMessagesPerTask=1"/> <to uri="mq-broker2:queue:output.GW02?preserveMessageQos=true&amp;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.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content