You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rastislav Papp (Jira)" <ji...@apache.org> on 2022/08/09 06:08:00 UTC
[jira] [Updated] (CAMEL-18367) Unable to use MDC variables in transacted route
[ https://issues.apache.org/jira/browse/CAMEL-18367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rastislav Papp updated CAMEL-18367:
-----------------------------------
Description:
I have a route which is {{{}.transacted(){}}}. I use {{{}MDCUnitOfWork{}}}, whose {{beforeProcess}} and {{afterProcess}} methods are called in {{CamelInternalProcessor}} - {*}but only if the route is not transacted{*}.
With my limited camel internals knowledge, I do not understand why {{beforeProcess}} and {{afterProcess}} are called only for non-transacted routes. In my typical scenario, MDC variables work well until I get to a transacted route, then at the last processor before the transacted route the {{afterProcess}} (which clears MDC variables) is called, and {{beforeProcess}} is never called, so there are no MDC variables inside the transacted route.
was:
I have a route which is {{.transacted()}}. I use {{MDCUnitOfWork}}, whose {{beforeProcess}} and {{afterProcess}} methods are called in {{CamelInternalProcessor}} - *but only if the route is not transacted*.
With my limited camel internals knowledge, I do not understand why 'beforeProcess' and 'afterProcess' are called only for non-transacted routes. In my typical scenario, MDC variables work well until I get to a transacted route, then at the last processor before the transacted route the {{afterProcess}} (which clears MDC variables) is called, and {{beforeProcess}} is never called, so there are no MDC variables inside the transacted route.
> Unable to use MDC variables in transacted route
> -----------------------------------------------
>
> Key: CAMEL-18367
> URL: https://issues.apache.org/jira/browse/CAMEL-18367
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.14.4
> Reporter: Rastislav Papp
> Priority: Minor
>
> I have a route which is {{{}.transacted(){}}}. I use {{{}MDCUnitOfWork{}}}, whose {{beforeProcess}} and {{afterProcess}} methods are called in {{CamelInternalProcessor}} - {*}but only if the route is not transacted{*}.
> With my limited camel internals knowledge, I do not understand why {{beforeProcess}} and {{afterProcess}} are called only for non-transacted routes. In my typical scenario, MDC variables work well until I get to a transacted route, then at the last processor before the transacted route the {{afterProcess}} (which clears MDC variables) is called, and {{beforeProcess}} is never called, so there are no MDC variables inside the transacted route.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)