Created
March 1, 2018 16:45
-
-
Save adamw/aca5a17bc9281c665db51ba5e539c203 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
KStreamBuilder builder = new KStreamBuilder(); | |
builder.stream(keySerde, valueSerde, "my_entity_events") | |
.groupByKey(keySerde, valueSerde) | |
// the folding function: should return the new state | |
.reduce((currentState, event) -> ..., "my_entity_store"); | |
.toStream(); // yields a stream of intermediate states | |
return builder; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment