...
If users have an existing stateful operator and add mapRecordValue before this operator, will change the Value from V to RecordValue<V> , causing a backward-incompatibile topology change.
To
API will be extended to support headers and be backwards compatible.
KStreamSetRecordHeaders
and KStreamMapRecordValue
are both using the latest Processor
API from KIP-478.
Rejected Alternatives
Expand `KeyValue` to support headers. This will affect all current APIs, from KStream/KTable to Stores.
Adding `mergeHeaders` functions to join/aggregation. Although this will extend support for headers, will add complexity to existing functions.
(initial version of this KIP) Add Header-specific methods to the DSL (e.g. `withHeaders`, `addHeader`, `removeHeaders`). Although this will allow accessing and manipulating headers from DSL, it will have a high impact on the existing KStream API (too many methods) and only specific for Headers. Also, it will require dealing with the same abstraction as Kafka Records. Will require more methods to cover other metadata.
...