You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by risen <li...@dhc.com.cn> on 2013/09/06 04:02:44 UTC
camel2.11.0 threads
I'm new in camel.
threadPool:
<threadPool id="threadPcSend" poolSize="8"
threadName="pcSend" maxPoolSize="8" maxQueueSize="1024"
keepAliveTime="0" />
camel-route:
<camel:route id="pcSendRoute">
<camel:from uri="timer://pcSendTimer?period=2000&delay=5000" />
<threads executorServiceRef="threadPcSend">
<camel:bean ref="PcSend" method="update" />
</threads>
</camel:route>
when the "update" method runs in 2s,the eight threads can run every 2s.
but when anyone of the threads run over 2s,others will wait until the thread
is over.
How can i make the threads work every 2s whether anyone is working or not.
Thank you so much!
--
View this message in context: http://camel.465427.n5.nabble.com/camel2-11-0-threads-tp5738811.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel2.11.0 threads
Posted by risen <li...@dhc.com.cn>.
Hi Claus!
Thank you so much!
We change the route just like what you say.
It works fine!
--
View this message in context: http://camel.465427.n5.nabble.com/camel2-11-0-threads-tp5738811p5738823.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel2.11.0 threads
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Camel 2.12 should allow to do this. So just try to upgrade to use it
when its out.
As the timer supports the async routing engine from 2.12 onwards
http://camel.apache.org/asynchronous-routing-engine.html
For earlier releases you can send to a seda queue first
from timer
to seda
from seda
to bean
On Fri, Sep 6, 2013 at 4:02 AM, risen <li...@dhc.com.cn> wrote:
> I'm new in camel.
> threadPool:
> <threadPool id="threadPcSend" poolSize="8"
> threadName="pcSend" maxPoolSize="8" maxQueueSize="1024"
> keepAliveTime="0" />
>
> camel-route:
> <camel:route id="pcSendRoute">
> <camel:from uri="timer://pcSendTimer?period=2000&delay=5000" />
> <threads executorServiceRef="threadPcSend">
> <camel:bean ref="PcSend" method="update" />
> </threads>
> </camel:route>
> when the "update" method runs in 2s,the eight threads can run every 2s.
> but when anyone of the threads run over 2s,others will wait until the thread
> is over.
> How can i make the threads work every 2s whether anyone is working or not.
> Thank you so much!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel2-11-0-threads-tp5738811.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen