You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/08/03 14:13:57 UTC

[GitHub] [camel-quarkus] davsclaus opened a new issue #2978: Camel 3.12 - New feature: route configurations

davsclaus opened a new issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978


   https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-16757
   
   camel-quarkus may need to add some code to support this for build time optimizations.
   
   There is a new RouteConfigurationBuilder (extends RouteBuilder) that should preferred to be added before any routes. However camel-core takes usually care of this.
   
   A good start is to make a quarkus example of the spring boot
   https://github.com/apache/camel-spring-boot-examples/tree/main/routes-configuration
   
   It uses route configurations in java, xml, and yaml


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on issue #2978: [Camel 3.12] New feature: route configurations

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-977784685


   I've re-ordered the route additions to the camel context and it's now working even when main is disabled.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger closed issue #2978: [Camel 3.12] New feature: route configurations

Posted by GitBox <gi...@apache.org>.
aldettinger closed issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on issue #2978: [Camel 3.12] New feature: route configurations

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-971436941


   I think end users could choose by explicitly setting `quarkus.camel.main.enabled = false`. There is a [single deployment test](https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/DisabledMainTest.java#L58) for this in camel quarkus as of today, so it may be a corner case.
   
   Anyway, when `quarkus.camel.main.enabled = false` then `CamelContextProcessor.runtime()` [kicks in](https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelContextProcessor.java#L132) and the route configurations might not not be added before route builders (just a guess, not demonstrated at this stage).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] davsclaus commented on issue #2978: [Camel 3.12] New feature: route configurations

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-971403616


   When would camel main be disabled or enabled?
   
   For Camel K I would assume we boot with camel main.
   And for regular quarkus with Camel then end users can choose?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on issue #2978: [Camel 3.12] New feature: route configurations

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-970332000


   The default case where camel main is enabled is ok. Under the hood, we use a RoutesConfigurer that ultimately adds the discovered routes in the right order, i.e. route configurations before classical route builders. This is the case in all current itests and the re-ordering is happening correctly.
   
   The case where camel main is disabled in another beast. The route builders order depends upon a mix of route discovery, route known by the container and route provided by the registry. More investigation is needed but likely route builder re-ordering will be needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on issue #2978: Camel 3.12 - New feature: route configurations

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-961022304


   Related camel PR: https://github.com/apache/camel/pull/5917/files#diff-e510105c62e50b5f9cfe0a983a17e3df523e09668e568380805ccaab6dd277ff


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] davsclaus commented on issue #2978: [Camel 3.12] New feature: route configurations

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-961062812


   Same build time as regular RouteBuilder classes
   Add them before regular RouteBuilder
   
   camel-core uses routes loader to load/add routes, and it has logic such as
   ```
       default void loadRoutes(Collection<Resource> resources) throws Exception {
           Collection<RoutesBuilder> builders = findRoutesBuilders(resources);
           // add configuration first before the routes
           for (RoutesBuilder builder : builders) {
               if (builder instanceof RouteConfigurationsBuilder) {
                   getCamelContext().addRoutesConfigurations((RouteConfigurationsBuilder) builder);
               }
           }
           for (RoutesBuilder builder : builders) {
               getCamelContext().addRoutes(builder);
           }
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on issue #2978: Camel 3.12 - New feature: route configurations

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #2978:
URL: https://github.com/apache/camel-quarkus/issues/2978#issuecomment-961034959


   @davsclaus It is working against the [current test coverage](https://github.com/apache/camel-quarkus/commit/a2f9cf851641d797b7cabca7074cfeb3ab128580).
   
   Would you please have any precise ideas about:
   - Possible build time optimizations ?
   - Cases where RouteConfigurationBuilders should be added before RouteBuilders on camel-quarkus side ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org