Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Kafka Streams tutorial: windows and state

        A stream processor reads records and maintains results as events arrive. Work through a window example before deciding what a late event should change.

        Checked 14 November 2026

        A delivery window

        A fictional dispatch team counts parcel scans in ten-minute event-time windows. Scans stamped 09:02 and 09:08 belong to the window starting at 09:00. A scan stamped exactly 09:10 belongs to the next window. The timestamp on the event can differ from the time it reaches the processor.

        Late records

        Suppose a 09:07 scan arrives after records with later event timestamps. A grace period can allow the earlier window to accept the late record until stream time advances beyond the window’s closing boundary. Wall-clock delay alone does not establish that a record is too late. Check the timestamp extractor, window end and grace together.

        State and joins

        A count needs a state store for its running result. A table join also needs a clear interpretation of updates: enriching a new scan with a route table differs from joining two event streams within a time window. Explain the record key and join bounds before treating missing matches as missing data.

        Practice and implementation

        The Kafka course simulates selected windows, state and joins through named lab controls. It does not compile a Java Kafka Streams application, run RocksDB or benchmark a real deployment. Use the official Streams documentation for the library and its APIs. Inspect your simulated output, then explain how a production application would restore its state after a failure.

        Sources

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.