davsclaus commented on code in PR #27430:
URL: https://github.com/apache/camel/pull/27430#discussion_r4193500366
##########
core/camel-core-model/src/main/java/org/apache/camel/model/RouteConfigurationDefinition.java:
##########
@@ -233,8 +233,17 @@ public final OnExceptionDefinition onException(Class<?
extends Throwable>... exc
public OnCompletionDefinition onCompletion() {
OnCompletionDefinition answer = new OnCompletionDefinition();
answer.setRouteConfiguration(this);
- // is global scoped by default
- answer.setRouteScoped(false);
+ if (getId() == null) {
Review Comment:
With `routeScoped=true` the onCompletion is registered by every opted-in
route the exchange passes through, so it fires once per route (2 times when the
consumer and the `direct:` route both use `routeConfigurationId("myconfig")`,
or when the sub-route is called twice). See the review summary: it should fire
once per exchange.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]