Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.0
-
None
-
Patch Available
Description
MDCUnitOfWork.clear() removes any content set by MDCUnitOfWork from MDC.
If there are two separate exchange running at the same time in the same thread, as happens when a ProduceTemplate is used from Java, this is incorrect because the MDC of the parent is cleared after the child completes.
Conceptually the MDC should be a stack, but MDC only accepts strings so the simplest thing to do is for MDCUnitOfWork to replace the previous values in clear().