activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kuntalc-techid <>
Subject Message consumption stuck from activemq using camel jms component
Date Wed, 22 Jun 2016 09:20:50 GMT

I have an application with two camel routes:

    Route 1 (Consumer Route)

Reads a text file having no. of records (line separated), split them based
on each line and sends each split record to another queue ('intermediate'

    Route 2 (Producer Route)

Reads each record from intermediate queue, transform them and sends them to
an out queue.

I am using ActiveMQ with camel JmsComponent (concurrentConsumers=7,
maxConcurrentConsumers=10). I guess camel uses Spring DMLC underneath to
read from the queue.

Configurations: =

<bean id="cachingConnectionFactory"
    <property name="targetConnectionFactory" ref="jmsmqConnectionFactory" />
    <property name="reconnectOnException" value="true" />
    <property name="sessionCacheSize" value="7" />

<bean id="jmsComponent" class="org.apache.camel.component.jms.JmsComponent">
    <property name="connectionFactory" ref="cachingConnectionFactory" />
    <property name="cacheLevelName" value="CACHE_CONSUMER" />
    <property name="transacted" value="true" />
    <property name="transactionManager" ref="transactionManager" />


Now, the problem is, if the no. of records in the file is very less (10 or
less), the split records are getting stuck in the intermediate queue. The
Producer Route is running but no message consumption. There is no exception
found in any of the logs and the Consumer Route is also up and running.

However, by setting prefetch limit to 0, this problem is gone but leading to
another issue - The camel routes could not be forcibly stopped by ctrl+C
with cacheLevel as CACHE_CONSUMER. Though CACHE_AUTO works fine, performance

Now is there any known issue with prefetch > 0 and SpringDMLC or am I
missing something?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message