Context propagation is not working in Quarkus 2.2.3 when using JBoss MDC and Mutiny
Issue
- Issue is in context propagation when trying to use MDC and reactive (Mutiny) programming.
Logging outside of reactive code uses MDC fine, but logic within (onItem), does not recognize added MDC => propagation not working.
On the other hand, if I simply switch to latest (unsupported) version of Quarkus (2.6.3), it works fine.
To move to latest one I simply replaced following two lines in POM:
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>2.6.3.Final</quarkus.platform.version>
On RedHat build of Quarkus (2.2.3), logging result is (attached zip file):
... (vert.x-eventloop-thread-5) [e91f5598-a6e5-4948-a55d-6f7a093a634b] Test to check if MDC is working
... (vert.x-eventloop-thread-0) [] Response in: 908 ms
On unsupported build (2.6.3), logging result is (once above replacement is done):
... (vert.x-eventloop-thread-4) [56c60613-0192-4897-a48e-42b83b3bec72] Test to check if MDC is working
... (vert.x-eventloop-thread-4) [56c60613-0192-4897-a48e-42b83b3bec72] Response in: 1360 ms
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.