You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Pascal Schumacher (Jira)" <ji...@apache.org> on 2020/01/28 17:48:00 UTC

[jira] [Commented] (CAMEL-14442) Scheduler no longer shared between routes using the same scheduler name

    [ https://issues.apache.org/jira/browse/CAMEL-14442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025330#comment-17025330 ] 

Pascal Schumacher commented on CAMEL-14442:
-------------------------------------------

Thank you very much for the quick fix! :-)

> 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: Minor
>             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)