title: How to read Kafka message header from a kstream apllication
body: <p>Is it possible to read Kafka message header which I set in my kafkaProducer application from kstream application? My KafkaProducer looks like this; I have set header in my message</p>
  <pre><code>public class Producer {
  private final org.slf4j.Logger log = LoggerFactory.getLogger(Producer.class);
  @Value(&quot;${topic.name}&quot;)
  private String TOPIC;
  
  private final KafkaTemplate&lt;Integer, testEvent&gt; kafkaTemplate;
  
  @Autowired
  public Producer(KafkaTemplate&lt;Integer, testEvent&gt; kafkaTemplate) {
  this.kafkaTemplate = kafkaTemplate;
   }
   public void sendTestEvent(DataDto data) throws Exception {
  TestEvent=testEvent.newBuilder()
  .setTestEventId(data.getTestEventId())
  .setTest(data.getTest().toString())
  .build();
  Message&lt;testEvent&gt; message = MessageBuilder
                  .withPayload(event)
                  .setHeader(KafkaHeaders.TOPIC, TOPIC)
                  .setHeader(KafkaHeaders.MESSAGE_KEY, 999)
                  .setHeader(KafkaHeaders.PARTITION_ID, 0)
                  .setHeader(&quot;X-Custom-Header&quot;, &quot;Sending Custom Header with Spring Kafka&quot;)
                  .build();
        this.kafkaTemplate.send(message);
        log.info(String.format(&quot;Produced user -&gt; %s&quot;, event));
  }
  </code></pre>
  <p>the Kstream application is</p>
  <pre><code>public class MessageReader {
  
  
  @Bean
  public KStream&lt;String, testEvent&gt; kstreamPromotionUppercase(StreamsBuilder builder) {
      
      KStream&lt;String, testEvent&gt; sourceStream = builder.stream(&quot;test-topic&quot;);
  
      sourceStream.print(Printed.&lt;String, testEvent&gt;toSysOut().withLabel(&quot;Original Stream&quot;));
      
      KStream&lt;String, testEvent&gt; uppercaseStream =sourceStream.mapValues(this::MessageReaderCode);
      
      return sourceStream;
  }
  </code></pre>
  <p>How do I read my headers in kstream which I set into my kafkaproducer.</p>