Propagating MDC Context Across REST Endpoints and Kafka Consumers/Producers

In this post, we will explore how to propagate the MDC (Mapped Diagnostic Context) among REST endpoints using the JAX-RS API standard and Kafka consumers/producers in Quarkus and Spring Boot services. Motivation Why should we propagate the MDC context across REST endpoints and Kafka? There are multiple use cases, but one of the most important is troubleshooting. A common scenario is writing…