You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2021/01/19 18:55:00 UTC

[jira] [Commented] (CAMEL-16063) should consider multiple ApplicationContext instances when specifying another management.server.port

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

Freeman Yue Fang commented on CAMEL-16063:
------------------------------------------

The problem comes from that if management.server.port specified, there are two ApplicationContext, one is for the default Web Container(8080) with ID "Application", another one is for the actuator management port(8081) with ID "Application Management", and the second one is the child of the first one. We should consider this when running CamelRouteCollector

> should consider multiple ApplicationContext instances when specifying another management.server.port
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-16063
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16063
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring-boot
>            Reporter: Freeman Yue Fang
>            Assignee: Freeman Yue Fang
>            Priority: Major
>         Attachments: camel-springboot-example.tar
>
>
> As the attached reproducer, when the SB camel application has another management.server.port specified, not all camel routes from the classpath(xml, java) can be collected.
> The output is like 
> {code}
> 2021-01-19 13:43:25.932  INFO 61489 --- [1 - timer://foo] hello from Java DSL                      : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2021-01-19 13:43:25.933  INFO 61489 --- [1 - timer://foo] hello from Camel XML                     : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2021-01-19 13:43:25.933  INFO 61489 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> {code}
> if no management.server.port specified. Otherwise, if management.server.port specified for spring-boot-acturator, then the output is like
> {code}
> 2021-01-19 13:19:38.236  INFO 61101 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2021-01-19 13:19:39.227  INFO 61101 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2021-01-19 13:19:40.228  INFO 61101 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2021-01-19 13:19:41.228  INFO 61101 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> 2021-01-19 13:19:42.227  INFO 61101 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
> {code}
> Camel route from classpath not collected



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