Sobes.tech
Senior

In working with Kafka — where and how is the state model stored (unlike synchronous mode, where everything is stored in memory)?

sobes.tech AI

Answer from AI

In Kafka Streams, the state model (state store) is stored in local disk stores (for example, RocksDB), not just in memory. This allows processing large volumes of data and recovering after failures.

Additionally, the state is periodically snapshotted and replicated into special Kafka topics — changelog topics. This ensures fault tolerance and the ability to restore state upon application restart.

Thus, unlike the synchronous mode, where state can only be stored in memory, Kafka Streams uses a combination of local disk storage and change logs in Kafka for reliable and scalable state management.

In working with Kafka — where and how is the state… - sobes.tech