[ 
https://issues.apache.org/jira/browse/CAMEL-14442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-14442.
---------------------------------
    Fix Version/s: 3.0.2
                   3.1.0
         Assignee: Claus Ibsen
       Resolution: Fixed

> Scheduler no longer shared between routes using the same scheduler name
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-14442
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14442
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-scheduler
>    Affects Versions: 3.0.1
>            Reporter: Pascal Schumacher
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.1.0, 3.0.2
>
>
> Using Camel 3.0.1 the scheduler/scheduler-thread is no longer shared between 
> routes using the same scheduler name.
> Using this test:
> {code:java}
> public class MultipleRoutesSameSchedulerTest extends CamelTestSupport {
>     @Override
>     protected RouteBuilder[] createRouteBuilders() throws Exception {
>         return new RouteBuilder[] {
>             new RouteBuilder() {
>                 public void configure() {
>                     from("scheduler:test?delay=1s").log("test1");
>                 }
>             },
>             new RouteBuilder() {
>                 public void configure() {
>                     from("scheduler:test?delay=2s").log("test2");
>                 }
>             },
>         };
>     }
>     @Test
>     public void test() throws Exception {
>         getMockEndpoint("mock:test").expectedMessageCount(1);
>         assertMockEndpointsSatisfied(100, TimeUnit.SECONDS);
>     }
> }
> {code}
> Camel 2.23.0 uses the same thread:
> {code}
> 22:05:04.698 [Camel (camel-1) thread #1 - scheduler://test] INFO route1 - 
> test1
> 22:05:05.697 [Camel (camel-1) thread #1 - scheduler://test] INFO route2 - 
> test2
> {code}
> Camel 3.0.1 uses two different threads:
> {code}
> 22:03:02.488 [Camel (camel-1) thread #1 - scheduler://test] INFO route1 - 
> test1
> 22:03:02.308 [Camel (camel-1) thread #2 - scheduler://test] INFO route2 - 
> test2
> {code}
> Latest documentation claims that only one scheduler/scheduler-thread will be 
> used:
> {quote}
> scheduler:name[?options]
> Where name is the name of the scheduler, which is created and shared across 
> endpoints. So if you use the same name for all your scheduler endpoints, only 
> one scheduler thread pool and thread will be used...
> {quote}
> Am I missing something?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to