Reputation: 161
I'm new in kstreams, and want to understand some of processes.
Aggregation function is creating a kafka topic with changelog, but why? Only for backup? As far as I understand kstreams needs statestore locally, so when is used data from topic? Only if some operations fault or to recreate statestore after app restart?
Upvotes: 0
Views: 90
Reputation: 6593
Changelog topics are created for state store. Although state store is kept locally, its value might be used remotely.
If you performed aggregation several situation can happen:
In those situation intermediate results are needed to calculate final one. If there wasn't changelog topic with intermediate results, computation would have to start from scratch.
I think changelog topic is for performance and fault tolerance.
Some interesting information about Internal topic and Duality of streams and tables(changelog topic).
Upvotes: 2