[ 
https://issues.apache.org/jira/browse/CAMEL-25420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-25420:
--------------------------------
    Component/s: camel-core

> camel-core - routeConfiguration onCompletion: YAML/XML DSL parity gap 
> (configurationId dedup does not apply)
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25420
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25420
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.24.0
>
>
> In the fix for CAMEL-25135, the configurationId-based dedup and the 
> conditional {{routeScoped}} logic for named route configurations are gated on 
> the fluent {{RouteConfigurationDefinition.onCompletion()}} method, which sets 
> the {{routeConfiguration}} back-reference on each {{OnCompletionDefinition}}.
> YAML and XML route configurations bypass this method entirely: they call 
> {{setOnCompletions()}} directly (via 
> {{RouteConfigurationDefinitionDeserializer}} for YAML, and {{ModelParser}} / 
> JAXB binding for XML/Spring). As a result:
> - {{onCompletion}} definitions created via YAML or XML never receive the 
> {{routeConfiguration}} back-reference.
> - The conditional {{routeScoped}} logic added in CAMEL-25135 does not apply 
> to them.
> - The {{OnCompletionReifier}} configurationId-based dedup does not fire for 
> YAML/XML-defined route configurations.
> This means named route configurations defined in YAML or XML can still fire 
> multiple times per exchange when multiple opted-in routes are traversed (the 
> exact bug fixed in CAMEL-25135 for the Java DSL).
> A DSL-agnostic fix would be to apply the {{routeScoped}} and dedup logic at 
> the merge point where route configurations are applied to routes (e.g. 
> {{RouteDefinitionHelper.getRouteConfigurationDefinitionConsumer()}} used by 
> both {{RoutesDefinition.prepareRoute()}} and 
> {{AbstractCamelContextFactoryBean}}), or in a runtime check inside 
> {{OnCompletionProcessor}} that does not rely on the back-reference.
> Tracked here as a follow-up to keep CAMEL-25135 focused. See PR #27430 for 
> the Java DSL fix and the review discussion that identified this gap.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to