title: Spring Kafka and MDC
body: <p>I have a Kafka consumer implemented as :</p>
  
  <pre><code>@KafkaListener(topics="...", group-id="....")
  public void doProcessing(@Payload String data, @Headers Map&lt;String, Object&gt; headers)
  {
  //read one of the headers and get a unique id pertaining for thread
  //set that header value in MDC
  String messageUniqueIdentifier=headers.get("myRequestIdentifierKey");
  MDC.put("myRequestIdentifierKey",messageUniqueIdentifier)
  log.info("logging just to see if the unique identifier comes in the logs or not);
  //do some processing
  }
  </code></pre>
  
  <p>Is this a safe approach? Is it always gauranteed that the same thread will
  service one message in the consumer?</p>