Your consuming route only defines one consumer (i.e. concurrentConsumers is not set, so it defaults to 1). Try increasing that.
> On Apr 7, 2016, at 7:10 AM, Michele <michele.mazzi...@finconsgroup.com> wrote: > > Hi everyone, > > I use ActiveMQ Component for my use case that foresee: > > 1. Read file from folder wich main cotain large number of line > 2. Split with stream, Process each line and then store it in Active MQ > 3. Consumers recieves messages from queue and then to invoke a Rest Service. > > I defined a Pooled Connection Factory on ActiveMQ like this > > <bean id="jmsConnectionFactory" > class="org.apache.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL" value="tcp://localhost:61616" /> > <property name="userName" value="admin" /> > <property name="password" value="admin" /> > </bean> > > <bean id="pooledConnectionFactory" > class="org.apache.activemq.pool.PooledConnectionFactory" > init-method="start" destroy-method="stop"> > <property name="maxConnections" value="8" /> > <property name="connectionFactory" ref="jmsConnectionFactory" /> > </bean> > > <bean id="jmsConfigNoTx" > class="org.apache.camel.component.jms.JmsConfiguration"> > <property name="connectionFactory" ref="pooledConnectionFactory" /> > <property name="concurrentConsumers" value="10" /> > <property name="transferExchange" value="true" /> > </bean> > > > <bean id="activemq" > class="org.apache.activemq.camel.component.ActiveMQComponent"> > <property name="configuration" ref="jmsConfigNoTx" /> > </bean> > > and Route like this > > <route id="FileReader_Route"> > <from uri="file:incoming?....." /> > <split streaming="true" parallelProcessing="true"> > <tokenize token="\n" /> > <unmarshal ref="IncomingCSVFileDataFormat" /> > <process ref="DataProcessor" /> > <marshal ref="Gson" /> > <to uri="activemq:queue:incomingTickets" /> > </split> > </route> > > <route id="ProcessTicket_Route"> > <from > uri="activemq:queue:incomingTickets?destination.consumer.prefetchSize=0" /> > <throttle timePeriodMillis="10000" asyncDelayed="true"> > <constant>5</constant> > <to > uri="jetty:http://host/rs/v1.0/ticket?jettyHttpBindingRef=CustomJettyHttpBinding" > /> > </throttle> > </route> > > To resolve OutOfMemory problem on Active MQ I increased heap and I changed > activemq.xml like this: > > <policyEntry queue=">" producerFlowControl="true" memoryLimit="250mb" > optimizedDispatch="true" /> > > During test, I observed that only one Consumer works on the broker to > dequeue like image attached pooled-connection.png > <http://camel.465427.n5.nabble.com/file/n5780689/pooled-connection.png> . > Why this? > > But, Does Pooled Connection Factory work only onproducer side (Push message > in queue)? > How I obtain a cuncurrentConsumers on consumer side (Pop message from > queue)? > > > Environment: JBoss Fuse 6.2 based on Apache Camel and ActiveMQ. > > Thanks in advance > > Best Regards > > Michele > > > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Understanding-Pooled-Connection-Factory-on-ActiveMQ-tp5780689.html > Sent from the Camel - Users mailing list archive at Nabble.com.