You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2025/12/05 20:39:00 UTC
[jira] [Commented] (CAMEL-22717) MDC values get lost at interceptedSendTo Endpoint
[ https://issues.apache.org/jira/browse/CAMEL-22717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18043152#comment-18043152 ]
Claus Ibsen commented on CAMEL-22717:
-------------------------------------
Okay I have a prototype unit test for camel-mdc that has the MDC values
{code:java}
2025-12-05 21:37:31,205 [main ] INFO ExtensionHelper - ******************************************************************************** [, , , , , , , , ]
2025-12-05 21:37:31,205 [main ] INFO ExtensionHelper - Testing: testMDC() (org.apache.camel.mdc.MDCInterceptToEndpointBeanTest) [, , , , , , , , ]
2025-12-05 21:37:31,205 [main ] INFO ExtensionHelper - ******************************************************************************** [, , , , , , , , ]
2025-12-05 21:37:31,210 [main ] INFO logBefore - MDC Values present [main, camel-1, route1, CC4EBB446DCC868-0000000000000000, CC4EBB446DCC868-0000000000000000, , , , ]
2025-12-05 21:37:31,211 [main ] INFO beforeSend - MDC Values present [main, camel-1, route1, CC4EBB446DCC868-0000000000000000, CC4EBB446DCC868-0000000000000000, , , , ]
2025-12-05 21:37:31,211 [main ] INFO myBean - MDC Values lost [main, camel-1, route1, CC4EBB446DCC868-0000000000000000, CC4EBB446DCC868-0000000000000000, , , , ]
2025-12-05 21:37:31,211 [main ] INFO logAfter - MDC Values present [main, camel-1, route1, CC4EBB446DCC868-0000000000000000, CC4EBB446DCC868-0000000000000000, , , , ]
2025-12-05 21:37:31,212 [main ] INFO ExtensionHelper - ******************************************************************************** [main, camel-1, route1, CC4EBB446DCC868-0000000000000000, CC4EBB446DCC868-0000000000000000, , , , ]
{code}
> MDC values get lost at interceptedSendTo Endpoint
> -------------------------------------------------
>
> Key: CAMEL-22717
> URL: https://issues.apache.org/jira/browse/CAMEL-22717
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Affects Versions: 4.10.6, 4.14.2, 4.15.0
> Reporter: Daniel Fritsch
> Assignee: Pasquale Congiusti
> Priority: Minor
> Fix For: 4.17.0
>
> Attachments: demo-intercept-and-mdc.zip, screenshot-1.png
>
>
> when a endpoint logs and on this endpoint is a interceptSendTo active, then at the execution of the endpoints processor [can be any endpoint type (bean/cxfrs/...)] right after the interceptSendTo route the default MDC values (like camel.breadcrumbId) are not present. After the endpoint they are present again.
> note: This bug happens not when the route is transacted.
>
> see: Screenshot of the log
> !screenshot-1.png|width=537,height=449!
> see: demo project (i use a local activemq cause i tested it also with transacted)
> [^demo-intercept-and-mdc.zip]
>
> instead of the from("cMQConnectionFactory1:queue:test") line without transaction, it can be used this line also:
> {code:java}
> from("timer:mytimer?repeatCount=1") {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)