KIP-1104 — Allow Foreign Key Extraction from Both Key and Value in KTable Joins
Accepted Kafka 4.1 Streams
Adds a BiFunction<K, V, KO> foreignKeyExtractor overload to KTable.join() and related DSL methods so that the foreign key can be derived from both the record key and value, not just the value. The existing Function<V, KO> extractor forced users to duplicate key fields into the record value whenever the foreign key depended on the message key, creating data redundancy and potential inconsistency.
Details
| Author | Chu Cheng Li |
| Status | Accepted |
| Kafka Version | 4.1 |
| JIRA | KAFKA-17893 |
| Wiki | View on Apache Wiki |
| Created | 2024-10-30 |
| Last Modified | 2025-03-27 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.