camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skt99 <sk_tel...@yahoo.com>
Subject Re: concurrentconsumers thread safe?
Date Mon, 30 Nov 2009 21:44:59 GMT

It appears my configuration did not get copied properly..I am sending it
again...thanks.

  <camel:camelContext id="camelContext">
        <camel:route id="response">
            <camel:from uri="jms:queue:dev.callback.Response"/>
            <camel:to uri="bean:asyncMDPCallback"/>
        </camel:route>
    </camel:camelContext>

 <bean id="workflowflowExceptionTaskExecutor"
         
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
        <property name="corePoolSize" value="5"/>
        <property name="maxPoolSize" value="10"/>
        <property name="queueCapacity" value="25"/>
</bean>

 <bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
        <property name="connectionFactory"
ref="jcaPooledConnectionFactory"/>
        <property name="transactionManager" ref="transactionManager"/>
        <property name="transacted" value="true"/>
        <property name="taskExecutor" ref="workflowCallbackTaskExecutor"/>
        <property name="concurrentConsumers" value="5"/>
        <property name="maxConcurrentConsumers" value="10" />     
    </bean>

 <bean id="jms"
class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="configuration" ref="jmsConfig"/>      
 </bean>

Appreciate any help.


skt99 wrote:
> 
> Hi,
>    I have this configuration - The Spring context is loaded only once on
> app startup. An MDP asyncMDPCallback configured as a singleton using
> Spring, is setup to consume messages.
> 
>   <camel:camelContext id="camelContext">
>         <camel:route id="response">
>             <camel:from uri="jms:queue:dev.callback.Response" />
>             <camel:to uri="bean:asyncMDPCallback" />
>         </camel:route>
>     </camel:camelContext>
> 
>  <bean id="workflowflowExceptionTaskExecutor"
> class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
>         <property name="corePoolSize" value="5" />
>         <property name="maxPoolSize" value="10" />
>         <property name="queueCapacity" value="25" />
> </bean>
> 
>  <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>         <property name="connectionFactory"
> ref="jcaPooledConnectionFactory" />
>         <property name="transactionManager" ref="transactionManager" />
>         <property name="transacted" value="true" />
>         <property name="taskExecutor" ref="workflowCallbackTaskExecutor"
> />
>         <property name="concurrentConsumers" value="5" />
>         <property name="maxConcurrentConsumers" value="10" />     
>     </bean>
> 
>  <bean id="jms"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>         <property name="configuration" ref="jmsConfig" />      
>  </bean>
> 
> Is this setup for concurrentConsumers using ThreadPoolTaskExecutor
> thread-safe by default, or do I need to handle it in my app? Appreciate
> any help.
> 

-- 
View this message in context: http://old.nabble.com/concurrentconsumers-thread-safe--tp26582427p26582486.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message