Re: Camel scheduler is not concurrent

2016-04-15 Thread cookie
Thank you very much... that looks like the answer I am looking for.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-scheduler-is-not-concurrent-tp5781066p5781120.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel scheduler is not concurrent

2016-04-14 Thread Claus Ibsen
So if you want to use concurrent tasks on the same Camel route you
need to configure that on the scheduler.

I created an unit test to show how
https://github.com/apache/camel/commit/244868166b2df472a7bfe34e8bfaea6e453e6217

On Thu, Apr 14, 2016 at 2:44 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Its used when you use the same thread pool but for multiple routes.
> Then each route can have their own tasks if you set
> concurrentTasks=Number of routes.
>
> See the unit test TwoSchedulerConcurrentTasksTest
>
> Then both routes use the same scheduler with the name foo, and its
> configured to have 2 concurrent tasks, so there is a task for each
> route.
>
> On Thu, Apr 14, 2016 at 9:55 AM, cookie <cook...@gmx.net> wrote:
>> Hi.
>>
>>According to the camel scheduler documentation it is possible to
>> configure its threadpool to support more than one thread at a time.
>> According to the following  commit
>> <http://mail-archives.apache.org/mod_mbox/camel-commits/201502.mbox/%3cab29b22c34b342c596433209c2702...@git.apache.org%3E>
>> the option for it is "concurrentTasks=".
>>
>> However when I apply this option and use the debugger I see that the
>> configured number of threads are created but the scheduler always uses one
>> thread only, i.e. if I set a breakpoint in the corresponding bean method and
>> thus make the thread wait until after the next polling interval has reached,
>> I expect another thread to get activated and call the bean method but this
>> does not happen. Actually the additional threads NEVER get invoked, they are
>> just created.
>>
>> So one of my questions is: what is the intention behind concurrent tasks in
>> the scheduler?
>>
>> Also, is it possible to achieve the desired behavior using camel scheduler
>> or any other component?
>>
>> Thank you in advance
>>
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/Camel-scheduler-is-not-concurrent-tp5781066.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Camel scheduler is not concurrent

2016-04-14 Thread Claus Ibsen
Its used when you use the same thread pool but for multiple routes.
Then each route can have their own tasks if you set
concurrentTasks=Number of routes.

See the unit test TwoSchedulerConcurrentTasksTest

Then both routes use the same scheduler with the name foo, and its
configured to have 2 concurrent tasks, so there is a task for each
route.

On Thu, Apr 14, 2016 at 9:55 AM, cookie <cook...@gmx.net> wrote:
> Hi.
>
>According to the camel scheduler documentation it is possible to
> configure its threadpool to support more than one thread at a time.
> According to the following  commit
> <http://mail-archives.apache.org/mod_mbox/camel-commits/201502.mbox/%3cab29b22c34b342c596433209c2702...@git.apache.org%3E>
> the option for it is "concurrentTasks=".
>
> However when I apply this option and use the debugger I see that the
> configured number of threads are created but the scheduler always uses one
> thread only, i.e. if I set a breakpoint in the corresponding bean method and
> thus make the thread wait until after the next polling interval has reached,
> I expect another thread to get activated and call the bean method but this
> does not happen. Actually the additional threads NEVER get invoked, they are
> just created.
>
> So one of my questions is: what is the intention behind concurrent tasks in
> the scheduler?
>
> Also, is it possible to achieve the desired behavior using camel scheduler
> or any other component?
>
> Thank you in advance
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-scheduler-is-not-concurrent-tp5781066.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Camel scheduler is not concurrent

2016-04-14 Thread cookie
Hi.

   According to the camel scheduler documentation it is possible to
configure its threadpool to support more than one thread at a time.
According to the following  commit
<http://mail-archives.apache.org/mod_mbox/camel-commits/201502.mbox/%3cab29b22c34b342c596433209c2702...@git.apache.org%3E>
  
the option for it is "concurrentTasks=".

However when I apply this option and use the debugger I see that the
configured number of threads are created but the scheduler always uses one
thread only, i.e. if I set a breakpoint in the corresponding bean method and
thus make the thread wait until after the next polling interval has reached,
I expect another thread to get activated and call the bean method but this
does not happen. Actually the additional threads NEVER get invoked, they are
just created. 

So one of my questions is: what is the intention behind concurrent tasks in
the scheduler?

Also, is it possible to achieve the desired behavior using camel scheduler
or any other component?

Thank you in advance  





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-scheduler-is-not-concurrent-tp5781066.html
Sent from the Camel - Users mailing list archive at Nabble.com.