title: Is it possible to access message headers with Kafka Streams?
body: <p>With the addition of <a href="http://apache.spinellicreations.com/kafka/0.11.0.0/javadoc/org/apache/kafka/common/header/Header.html" rel="noreferrer">Headers</a> to the records (<a href="https://kafka.apache.org/0110/javadoc/org/apache/kafka/clients/producer/ProducerRecord.html" rel="noreferrer">ProducerRecord</a> &amp; <a href="http://mirror.reverse.net/pub/apache/kafka/0.11.0.0/javadoc/org/apache/kafka/clients/consumer/ConsumerRecord.html" rel="noreferrer">ConsumerRecord</a>) in Kafka 0.11, is it possible to get these headers when processing a topic with Kafka Streams? When calling methods like <code>map</code> on a <code>KStream</code> it provides arguments of the <code>key</code> and the <code>value</code> of the record but no way I can see to access the <code>headers</code>. It would be nice if we could just <code>map</code> over the <code>ConsumerRecord</code>s.</p>
  
  <p>ex.</p>
  
  <pre><code>KStreamBuilder kStreamBuilder = new KStreamBuilder();
  KStream&lt;String, String&gt; stream = kStreamBuilder.stream("some-topic");
  stream
      .map((key, value) -&gt;  ... ) // can I get access to headers in methods like map, filter, aggregate, etc?
      ... 
  </code></pre>
  
  <p>something like this would work:</p>
  
  <pre><code>KStreamBuilder kStreamBuilder = new KStreamBuilder();
  KStream&lt;String, String&gt; stream = kStreamBuilder.stream("some-topic");
  stream
      .map((record) -&gt; {
          record.headers();
          record.key();
          record.value();
      })
      ...
  </code></pre>