This is an automated email from the ASF dual-hosted git repository. bvahdat pushed a commit to branch set-from-endpoint in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/set-from-endpoint by this push: new ddf974a avoid overriding a preset endpoint of an exchange ddf974a is described below commit ddf974a781cebf99a79880d0d3b6e5d60cf55295 Author: Babak Vahdat <bvah...@apache.org> AuthorDate: Wed May 12 10:15:54 2021 +0200 avoid overriding a preset endpoint of an exchange --- .../java/org/apache/camel/impl/engine/CamelInternalProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java index fc13589..44d1d85 100644 --- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java @@ -731,8 +731,10 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In this.routeId = route.getRouteId(); } ExtendedExchange ee = (ExtendedExchange) exchange; - ee.setFromEndpoint(route.getEndpoint()); ee.setFromRouteId(routeId); + if (ee.getFromEndpoint() == null) { + ee.setFromEndpoint(route.getEndpoint()); + } } // only return UnitOfWork if we created a new as then its us that handle the lifecycle to done the created UoW