KIP-1321 — Headers aware StreamPartitioner
Accepted Kafka 4.4 Streams
Adds a `partitions(topic, key, value, Headers, numPartitions)` default method to `StreamPartitioner` that delegates to the existing overload, deprecating the header-less variant since 4.4 and threading headers through the related KafkaStreams metadata query paths. Partitioning for sink and repartition topics currently cannot see record headers, breaking the end-to-end header availability that KIP-1271 establishes from source through transformations and state stores.
Details
| Author | Uladzislau Blok |
| Status | Accepted |
| Kafka Version | 4.4 |
| JIRA | KAFKA-20197 |
| Wiki | View on Apache Wiki |
| Created | 2026-04-18 |
| Last Modified | 2026-08-30 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.