You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/07/29 16:00:00 UTC
[jira] [Commented] (CAMEL-15313) camel-core - Parameterized
RouteBuilder - add routes while starting the camel context
[ https://issues.apache.org/jira/browse/CAMEL-15313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167327#comment-17167327 ]
Claus Ibsen commented on CAMEL-15313:
-------------------------------------
I have a PR on the way which makes it work with current API, but we should find a better solution.
> camel-core - Parameterized RouteBuilder - add routes while starting the camel context
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-15313
> URL: https://issues.apache.org/jira/browse/CAMEL-15313
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Luca Burgazzoli
> Assignee: Claus Ibsen
> Priority: Major
> Labels: kamelets
> Fix For: 3.5.0
>
>
> Working to create a camel-kamelet component here: https://github.com/apache/camel-k-runtime/issues/375 and there is an issue when the routes templates are materialized:
> Assuming I have a route template defines as:
> {code:java}
> routeTemplate("setBody")
> .templateParameter("bodyValue")
> .from("direct:{{routeId}}")
> .setBody().constant("{{bodyValue}}");
> {code}
> And a route like:
> {code:java}
> from("direct:template")
> .to("kamelet:setBody/test?bodyValue=bv")
> .to("log:template");
> {code}
> Then the kamelet component would try to create a route named test out of the setBody template and:
> 1. if the route is create upon KameletComponent::createEndpoint, then the camel context would fails to materialize the template as there is a concurrent exception because a new route definition is added while the context is iterating over them
> 2. if the route is created upon KameletEndpoint::onStart, then the route is not added to the camel context
--
This message was sent by Atlassian Jira
(v8.3.4#803005)