...
This issue has been flagged by many people over the past period in forums.
Further details and a more detailed case for headers can be seen here : A Case for Kafka Headers
Public Interfaces
This KIP has the following public interface changes:
- Add a new headers value (byte[]) to the message format.
Add a headers (Map<String, String>Map<Integer, byte[]>) field to ProducerRecord and ConsumerRecord. A producer/interceptors will be able to set headers on a ProducerRecord. A consumer/interceptors will see the message headers when it sees the messages.
- Add accessor methods on the Producer/ConsumerRecord void setHeader(Stringint, Stringbyte[]) and a String byte[] getHeader(Stringint)
- Add ProduceRequest/ProduceResponse V3 which uses the new message format.
- Add FetchRequest/FetchResponse V3 which uses the new message format.
- Add a configurable headers serializer Serializer<Map<String, String> to ProducerRecord
- Add a configurable headers deserializer Deserializer<Map<String, String> HeadersDeserializer to ConsumerRecordThe serialization of the [
For more detail information of the above changes, please refer to the Proposed Changes section.
...
...