Last active
April 13, 2022 13:02
-
-
Save miguno/d950f61ffab364bd45384858eb6bc014 to your computer and use it in GitHub Desktop.
Kafka Streams Example: Continuously aggregating a stream into a table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Continuously aggregating a KStream into a KTable. | |
KStream<String, String> locationUpdatesStream = ...; | |
KTable<String, Long> locationsPerUser | |
= locationUpdatesStream | |
.groupBy((k, v) -> v.username) | |
.count(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment