A foreign key is a value-field reference to a key in another table. In Kafka Streams, it enables a KTable join when the tables use different primary keys. section 8.6.4
A Kafka Streams foreign-key join works by:
- Extracting the referenced key from the left-side value with a java.util.Function. section 8.6.4
- Skipping the join when the extractor returns null. section 8.6.4
- Supporting inner and left-outer joins without requiring co-partitioned tables. section 8.6.4
- Triggering potential results when either table receives an update. section 8.6.4
Client contracts and commodities
A client-contract KTable uses client ID as its key, while its value contains a commodity code. A commodity-price KTable uses that commodity code as its key. Extract the code from each contract value and pass the extractor to clientContractTable.join(commodityPriceTable, foreignKeyExtractor, joiner). section 8.6.4

















