Francis Altomare
09/05/2025, 7:19 AMTumblingProcessingTimeWindow and a reduce function to ensure only a single event within my window is emitted at a time 🧵.Francis Altomare
09/05/2025, 7:21 AM.keyBy { it.key }
.window(TumblingProcessingTimeWindows.of(Duration.ofSeconds(1)))
.reduce { a, b ->
b
}
However, it’s not clear to me if this reduce function will be called if there is only a single event within my window. Functionally, even if there is only a single event produced within my window I would like to emit it. If there are no events nothing should be omitted and if there are more than 1 events the latest version should be emitted.Elad
09/10/2025, 6:56 AMFrancis Altomare
09/18/2025, 6:31 PM