An example that shows how to work with headers in the producer, consumer, and Kafka Streams.
WARNING: this example is only meant to show how headers work. Lots of critical functionality is not included in these examples, for example shutdown hooks, error handling, etc.
- Open in IntelliJ
- Run
HeaderProducer
- Run
HeaderKafkaStreams
- Run
HeaderConsumer
Observe the Log4j output and look at the code.