[
https://issues.apache.org/jira/browse/CAMEL-15313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luca Burgazzoli updated CAMEL-15313:
------------------------------------
Labels: kamelets (was: )
> 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
> 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)