Search⌘ K
AI Features

Windowing: Tumbling and Hopping Windows

Explore the concepts of tumbling and hopping windows in Kafka Streams for grouping records into fixed-size, time-based windows before aggregation. Understand how tumbling windows create non-overlapping intervals for data processing, while hopping windows allow overlapping intervals. Learn how to control intermediate aggregation results using the suppress operator for effective stream processing.

We'll cover the following...

Windowing in Kafka Streams allow us to group records into time or event-based groups before an aggregation operation. There are four types of windows supported by Kafka Streams:

  • Tumbling window

  • Hopping window

  • Session window

  • Sliding window

Tumbling window

A tumbling window is a time-based, fixed-size window. There are no overlapping events between tumbling windows, meaning every event can belong exactly to one window.

Another important thing to know about tumbling windows is that they have an inclusive start time and an exclusive end time. Consider a window starting at t=5 with a fixed size of five seconds. An ...