Camel: Concurrent ActiveMQ Request/Reply messages, only one reply is consumed

Solution Verified - Updated -


When using CACHE_CONSUMER for a JMS Request/Reply pattern with a shared reply queue, concurrent messages are sent as requests, but only one reply is processed. The other message is still in the reply queue.

Example configuration:

                <bean id="cachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
                        <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>

                <bean id="jmsConfig"
                        <property name="connectionFactory" ref="cachingConnectionFactory" />
                        <property name="concurrentConsumers" value="2" />
                        <property name="transacted" value="false" />
                        <property name="cacheLevelName" value="CACHE_CONSUMER" />

Example Route:

                <route id="enqueueMessages">
                        <from uri="timer:foo?period=60000" />
                        <to uri="seda:my?waitForTaskToComplete=NEVER" />
                        <to uri="seda:my?waitForTaskToComplete=NEVER" />

                <route id="sendRequestReplyToAMQ">
                        <from uri="seda:my?concurrentConsumers=2" />
                        <setExchangePattern pattern="InOut"/>
                        <to uri="myamq:test?transferException=true&amp;replyTo=testQueueReply" />

                <route id="amqConsumer">
                        <from uri="myamq:test" />
                        <delay asyncDelayed="true"><constant>100</constant></delay>


  • Red Hat JBoss Fuse
    • 6.x
  • Red Hat A-MQ
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In