Croway opened a new pull request, #30234: URL: https://github.com/apache/camel/pull/30234
JIRA: [CAMEL-27076](https://issues.apache.org/jira/browse/CAMEL-27076) - `MDCService` set `camel.routeId` from `Exchange.getFromRouteId()`, the route that created the exchange. When a route calls another route (`direct:`), the processors and logs of the called route showed the id of the calling route. The deprecated `useMdcLogging`, which camel-mdc replaces, gives the called route. - `camel.routeId` is now `ExchangeHelper.getRouteId(exchange)`: the route being run, falling back to the route that created the exchange. When the exchange is back in the calling route, the value is the calling route again (the intercept strategy restores the previous MDC context). - mdc.adoc says what `camel.routeId` is. Tests: `MDCRouteIdTest` (camel-mdc). `testRouteIdIsTheRouteBeingRun` (route a calls route b; processors and `log` in both routes) fails on main (`inB` is `a`) and passes with the fix; `testRouteIdOfASingleRoute` passes on both. All 12 camel-mdc tests pass. Upgrade guide: `camel-4x-upgrade-guide-4_24.adoc`, "camel-mdc - camel.routeId is the route being run". _Claude Code on behalf of Federico Mariani_ -- 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]
