[
https://issues.apache.org/jira/browse/CAMEL-27076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18145931#comment-18145931
]
Claus Ibsen commented on CAMEL-27076:
-------------------------------------
Merged https://github.com/apache/camel/pull/30234 into main (commit
e081da340fd3c26e8d105ba4c24414a5acbd4945).
_Claude Code on behalf of davsclaus_
> camel-mdc - camel.routeId is the route that created the exchange, not the
> route being run
> -----------------------------------------------------------------------------------------
>
> Key: CAMEL-27076
> URL: https://issues.apache.org/jira/browse/CAMEL-27076
> Project: Camel
> Issue Type: Bug
> Reporter: Federico Mariani
> Assignee: Federico Mariani
> Priority: Minor
> Fix For: 4.24.0
>
>
> With camel-mdc, the {{camel.routeId}} MDC value is the id of the route that
> created the exchange ({{Exchange.getFromRouteId()}}), not the route that runs
> the processor or the log. When a route calls another route, every log line of
> the called route shows the calling route:
> {code:java}
> from("direct:a").routeId("a")
> .to("direct:b");
> from("direct:b").routeId("b")
> .log("in b"); // camel.routeId is a
> {code}
> The deprecated MDC logging ({{camel.main.useMdcLogging=true}}), which
> camel-mdc replaces, gives {{b}} here.
> Expected: {{camel.routeId}} is the route being run ({{b}} inside route b),
> and {{a}} again when the exchange is back in route a.
> _Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)