title: How to retrieve/set header using functional approach in spring-cloud-stream-binder-kafka-streams:3.1.1
body: <p>I am using <code>spring-cloud-stream-binder-kafka-streams:3.1.1</code> with functional programming. How can I retrieve all headers in processor function</p>
  <p><strong>Java code</strong></p>
  <pre><code>@SpringBootApplication
  public class KafkaMessageApplication {
      public static void main(String args[]) {
          SpringApplication.run(KafkaMessageApplication.class, args);
      }
  
      @Bean
      public Function&lt;KStream&lt;String, String&gt;, KStream&lt;String, String&gt;&gt; process() {
          // TODO investigate headers on the incoming message
          // For example, find partition key on which message was received and publish to same partition key on destination topic
          return input -&gt; input;
      }
  }
  </code></pre>