camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raffi <>
Subject Camel consumers created/destroyed every second...
Date Thu, 05 Jan 2017 22:19:50 GMT
I'm using the following configuration with Springboot 1.4/Java 1.8, Camel

In JMX I can see 8 consumers objects on the listening queue, but the
consumers are replaced with new ones, verified by session ID, every second.
This started happening the moment I changed from CACHE_CONSUMER/prefetch=200
to CACHE_NONE/prefetch=1. I cannot understand why this is happening;
idleConsumerLimit=3600000 (1 hour), but it appears Camel is
creating/destroying consumer sessions every second, even when queue is
empty. I verified the connection is being reused, so this appears to be
purely session related.

*Spring Config*
    <bean id="activemq"
        <property name="configuration" ref="jmsConfig" />
    <bean id="jmsConfig"
        <property name="cacheLevelName"          value="CACHE_NONE" />
        <property name="testConnectionOnStartup" value="true" />
        <property name="idleConsumerLimit"       value="3600000" />
        <property name="connectionFactory"      
ref="pooledConnectionFactory" />
    <bean id="pooledConnectionFactory"
        init-method="start" destroy-method="stop">
        <property name="maxConnections"     value="2" />
        <property name="expiryTimeout"      value="3600000" />
        <property name="idleTimeout"        value="3600000" />
        <property name="connectionFactory"  ref="connectionFactory" />
        <property name="maximumActiveSessionPerConnection" value="25"/>
    <bean id="connectionFactory"
        <property name="clientIDPrefix" value="route_name" />
        <property name="brokerURL"      value="${}" />
        <property name="userName"       value="${mq.user}" />
        <property name="password"       value="${mq.password}" />
        <property name="optimizeAcknowledge" value="true" />

*In Camel...*
       <route id="fromQueueToDb" autoStartup="true" >
            <from  uri="activemq:queue:myQueue?concurrentConsumers=8&amp;

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message