Quantcast

Setting TaskExecutor for JMS component

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Setting TaskExecutor for JMS component

dancerjohn
I would like to set up my jms component to use a specific `TaskExecutor` (actually would rather use an `ExecutorService` but doesn't seem possible). However why I try to do so I get an error.

My spring has the following:

    <bean id="jmsExecutorService" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor>....</bean>


My Route Builder has the following:

    from("jms:queue:myQueue?concurrentConsumers=20&taskExecutor=jmsExecutorService")...

When I run this I get the following error:

    IllegalArgumentException: Could not find a suitable setter for property: taskExecutor
         as there isn't a setter method with same type: String not a conversion possible:
         No type converter available to convert from type: String to the required type
         TaskExecutor with value jmsExecutorService

I have had a hard time finding a working example of setting the TaskExecutor. I would like to specify a specific TaskExecutor as I would like to name the threads in the thread-pool appropriately.

Would someone either help with the above or point me to documentation on how to use / set the TaskExecutor?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Setting TaskExecutor for JMS component

Claus Ibsen-2
Hi

Use taskExecutor=#jmsExecutorService

See more details at
http://camel.apache.org/how-do-i-configure-endpoints.html

On Wed, Apr 17, 2013 at 1:18 PM, dancerjohn <[hidden email]> wrote:

> I would like to set up my jms component to use a specific `TaskExecutor`
> (actually would rather use an `ExecutorService` but doesn't seem possible).
> However why I try to do so I get an error.
>
> My spring has the following:
>
>     <bean id="jmsExecutorService"
> class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor>....</bean>
>
>
> My Route Builder has the following:
>
>
> from("jms:queue:myQueue?concurrentConsumers=20&taskExecutor=jmsExecutorService")...
>
> When I run this I get the following error:
>
>     IllegalArgumentException: Could not find a suitable setter for property:
> taskExecutor
>          as there isn't a setter method with same type: String not a
> conversion possible:
>          No type converter available to convert from type: String to the
> required type
>          TaskExecutor with value jmsExecutorService
>
> I have had a hard time finding a working example of setting the
> TaskExecutor. I would like to specify a specific TaskExecutor as I would
> like to name the threads in the thread-pool appropriately.
>
> Would someone either help with the above or point me to documentation on how
> to use / set the TaskExecutor?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Setting-TaskExecutor-for-JMS-component-tp5731017.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Setting TaskExecutor for JMS component

dancerjohn
Ah, got it. Thanks!
Loading...