How to use MDC with thread pools?
Yes, this is a common problem I’ve run into as well. There are a few workarounds (like manually setting it, as described), but ideally you want a solution that Sets the MDC consistently; Avoids tacit bugs where the MDC is incorrect but you don’t know it; and Minimizes changes to how you use thread pools … Read more