...
We have an existing table() API in the StreamsBuilder which could materialize a Kafka topic into a local state store called KTable. As we know, currently there are 2 different types of state store: key-value based and window based. The current interface could only accept key-value store, which is not ideal. In this KIP, we would like to address this problem by creating a new API called windowedTable() which supports the generation of a windowed KTable.
Here comes the tricky part: in Kafka Streams, sometimes we may encounter the requirement of materializing a windowed topic. In the source processor point of view, the windowed topic input should be (Windowed<K> key, V value). So our discussion could actually extend to four cases:
Source topic | store type | |
---|---|---|
windowed | ||
non-windowed |
Public Interfaces
The current KTable API looks like:
...