title: Send TraceId across Threads
body: <p>We have a distributed application following microservice Architecture. In one of our microservice we are following producer-consumer pattern. </p>
  
  <p>The producer receives requests, persists it to database, pushes the request into a BlockingQueue and sends the response back to the client. The consumer running on a separate thread is listening to the blocking queue. The moment it gets the request object it performs specific operations on it.</p>
  
  <p>The request received by the producer is persisted to the database asynchronously using CompleteableFutures.</p>
  
  <p>The problem here is how to forward TraceId to the methods processing the requestObject inside consumer thread. Since the consumer thread might process these objects much later after the response is sent to the consumer.</p>
  
  <p>Also how to forward the traceId across Asynchronous calls?</p>
  
  <p>Thanks </p>