camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raúl Kripalani (JIRA) <>
Subject [jira] [Resolved] (CAMEL-7795) Regression: MDC may lose values after when Async Routing Engine is used
Date Tue, 09 Sep 2014 13:07:28 GMT


Raúl Kripalani resolved CAMEL-7795.
    Resolution: Fixed

> Regression: MDC may lose values after when Async Routing Engine is used
> -----------------------------------------------------------------------
>                 Key: CAMEL-7795
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.4, 2.13.2
>            Reporter: Raúl Kripalani
>            Assignee: Raúl Kripalani
>             Fix For: 2.12.5, 2.13.3, 2.14.0
> CAMEL-6377 introduced some optimisations in the MDC Logging mechanism which make it lose
MDC values when the async routing engine is used.
> If we are using an async component such as CXF, the response or done() callback will
be issued from a thread NOT managed by Camel. Therefore, we need the MDCCallback to reset
*ALL* MDC values, not just the routeId (as was intended by the commits that caused the regression).
> The situation may be salvaged by the fact that underlying MDC implementations use an
InheritableThreadLocal, so the first requests after system initialisation may see correct
behaviour, because the MDC values from the requesting thread is propagated to the newly initialised
threads in the underlying stack's ThreadPool, as the coreThreads are being initialised within
the context of the original threads which act like parent threads.
> But after those first attempts, odd behaviour is seen and all responses from the async
endpoint come back without an MDC.

This message was sent by Atlassian JIRA

View raw message