Hi rogelio,
I think you should not have maxConcurrentConsumers on a connection pool.
What you want may be maxConcurrentConsumers on the activemq consumer like:

from("activemq:topic:xmlOrders").to("activemq:accounting?concurrentConsumers=5");
from("activemq:topic:xmlOrders").to("activemq:production");


Regards,
Ngoc Hai


--- On Thu, 6/30/11, rogelio_sevilla1 <[email protected]> wrote:

> From: rogelio_sevilla1 <[email protected]>
> Subject: concurrentConsumers basic question
> To: [email protected]
> Date: Thursday, June 30, 2011, 12:08 AM
> Hello everyone,  sorry if this
> is too basic.
> 
> I'm beginning to use Camel (along with Fuse ESB but that's
> another story) , 
> and i'm doing some basic tests while reading "camel in
> action" (excellent
> book by the way). Anyway, i was trying an activemq
> concurrent example, and i
> configured it like this on my spring file:
> 
> 
> 
>  <bean id="jmsConnectionFactory" 
>    class="org.apache.activemq.ActiveMQConnectionFactory">
>    <property name="brokerURL"
> value="vm://localhost" />
>    
> </bean>
> 
> <bean id="pooledConnectionFactory" 
>    class="org.apache.activemq.pool.PooledConnectionFactory">
>    <property name="maxConnections"
> value="8" />
>    <property name="maximumActive"
> value="500" />
>    <property name="connectionFactory"
> ref="jmsConnectionFactory" />
> </bean>
> 
> <bean id="jmsConfig" 
>    class="org.apache.camel.component.jms.JmsConfiguration">
>    <property name="connectionFactory"
> ref="pooledConnectionFactory"/>
>    <property name="transacted"
> value="false"/>
>  * <property name="maxConcurrentConsumers"
> value="10"/>*
> </bean>
> 
> <bean id="activemq" 
>    
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>     <property name="configuration"
> ref="jmsConfig"/>
> </bean>
> 
> 
> *And I have a simple route doing this:*
> 
> 
> from("activemq:incomingOrders").to("activemq:topic:xmlOrders") 
> 
> 
>          
> from("activemq:topic:xmlOrders").to("activemq:accounting");   
>          
> from("activemq:topic:xmlOrders").to("activemq:production");   
> 
> 
> *Accounting and production have a processos printing
> something like this: *
> 
> Accounting received the order from: dummy.xml
> Production received the order from: dummy.xml
> 
> 
> The problem is that, when I use the *<property
> name="concurrentConsumers"
> value="10"/>*  option  on my spring
> configuration file,  the
> *activemq:accounting* and *activemq:production* are getting
> the message more
> than once (around 7 times each one), and when i use the
> config    
> *<property name="maxConcurrentConsumers"
> value="10"/>*  everything works ok. 
> does concurrentConsumers force the usage of more threads
> even if they are
> not needed??, what's the correct usage of
> concurrentConsumers??
> 
> Sorry if this is too basic, and thanks for your time :-D
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/concurrentConsumers-basic-question-tp4535789p4535789.html
> Sent from the Camel - Users mailing list archive at
> Nabble.com.
>

Reply via email to