You can do more research on the "Stream-Table Duality".
example of ktable and kstream and what can I do?
A KStream is an audit log of all, or a filtered subset of events in the topic. It's hard to quickly pick out any given event
A KTable holds the most recent keyed event from a stream and allows for fast key lookups
A counter is the simplest example; You have a stream of events (say, words from hashtags)
#kafka is greatworking with #kafka today#streaming all the things
So, that's the stream. You then need to consume this stream into an aggregated table, parsing out and counting the hashtags, resulting in key value pairs
(kafka, 2)(streaming, 1)
However, if you were to query the table immediately after the first event (before the table consumed the remaining events) you'd only see (kafka, 1)
.