[ 
https://issues.apache.org/jira/browse/CAMEL-17721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-17721:
--------------------------------
    Component/s: came-core

> MDC - custom MDC property value is fixed to first assigned value by 
> MDCUnitOfWork
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-17721
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17721
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.11.5, 3.14.1
>            Reporter: Vladimir Dobos
>            Priority: Minor
>
> Once value (that matches "mdc-logging-keys-pattern" from configuration) is 
> assigned/set to MDC and gets into MDCUnitOfWorks#MDCCallback "custom" map, it 
> cannot be changed further down in the route (at least in processor), as 
> changed value is always overwritten at the end of processing step with 
> originally assigned value.
> This breaks use-cases, when you want to assign temporary value to one MDC 
> property to signify the value could not be retrieved during some processing 
> steps (but can be assigned further down).
> For example, when you assign, for example N/A to property "someID" in 
> processor, right after consumer at the start of route, and want to change it 
> few steps down, it will be overwritten back to "N/A" by MDCCallback.
> This interacts nastily with CAMEL-17722, making custom MDC properties 
> unusable.
>  
> Tested in single-threaded route with no async processing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to