Two comments: One, the ActiveMQ Camel Component wraps the connection factory in an ActiveMQ PooledConnectionFactory. My first reaction would be that this would produce a less than predictable result. Both the AMQ PCF and the Spring CCF are trying to manage pools and sessions. Very unpredictable.
You could disable it on the component but I would suggest to eliminate the use of the Spring CCF and just use the capabilities already present in the AMQ Camel component. Two, the CachingConnectionFactory & the ActiveMQConnectionFactory have a history of not playing well with each other in the area of failure management. If you are using AMQ failover protocols, you have to be very careful in how you configure the Spring CCF. Best Regards, Scott ES On Wed, Dec 5, 2012 at 3:55 PM, Christian Müller < christian.muel...@gmail.com> wrote: > It works also with the following configuration: > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd"> > > <bean id="broker" class="org.apache.activemq.broker.BrokerService" > init-method="start" destroy-method="stop"> > <property name="persistent" value="false" /> > <property name="transportConnectorURIs"> > <list> > <value>tcp://localhost:61616</value> > </list> > </property> > </bean> > > <camelContext xmlns="http://camel.apache.org/schema/spring"> > <jmxAgent id="agent" disabled="true"/> > > <route> > <from uri="activemq:ORDER_ENTRY?concurrentConsumers=5" /> > <transform><simple>Hello ${body}</simple></transform> > </route> > </camelContext> > > <bean id="activemq" > class="org.apache.activemq.camel.component.ActiveMQComponent"> > <property name="connectionFactory" ref="connectionFactory" /> > </bean> > > <bean id="connectionFactory" > class="org.springframework.jms.connection.CachingConnectionFactory"> > <property name="targetConnectionFactory" > ref="activeMQConnectionFactory" /> > <property name="sessionCacheSize" value="100" /> > <property name="cacheConsumers" value="false" /> > </bean> > > <bean id="activeMQConnectionFactory" > class="org.apache.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL" value="tcp://localhost:61616" /> > </bean> > </beans> > > If I set cacheConsumers to true, it works too. > > Best, > Christian > > On Mon, Dec 3, 2012 at 3:09 PM, anaCortes <anquiroe...@hotmail.com> wrote: > > > Hi, > > > > my problematic configuration had CachingConnectionFactory (with > > cacheConsumers true by default) and not PooledConnectionFactory. > > > > > > > > -- > > View this message in context: > > > http://camel.465427.n5.nabble.com/JMS-Shared-fixed-reply-queue-doesn-t-consume-all-the-messages-tp5721700p5723546.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > -- -- Scott England-Sullivan Apache Camel Committer Principal Consultant / Sr. Architect | Red Hat, Inc. FuseSource is now part of Red Hat Web: fusesource.com <http://www.fusesource.com> | redhat.com<http://www.redhat.com> Blog: sully6768.blogspot.com Twitter: sully6768