Window for the last N minutes

Hi all,
We want to achieve ​a view of the last N minutes per key.
We want a single window that slides over the time axis, for example:

A window is defined with a time difference of 5 minutes - all events that are less then 5 minutes apart should be in the window.
Event A: 10:00 [A]
Event B: 10:03 [A, B]
Event C: 10:06 [B, C]

We tried using hopping/sliding windows, but they’re both opening multiple windows. Is it possible to have 1 window that updates over time?

Did you try to use windowBy(SlidingWindows.withTimeDifference(...)) ?