A warehouse receives temperature readings from sensors throughout the day. Forwarding readings above a fixed threshold requires only the current record. Keeping the highest temperature observed for each sensor requires something more: the application must remember earlier readings.
That remembered information is processing state. It becomes part of the application's correctness, because losing it can change the answer even when the next input record is valid.
This chapter explains how Kafka Streams maintains state, where state stores live, and how tasks recover or expose their stored results. We'll follow a per-sensor temperature maximum to connect the calculation with its storage and operational requirements.