Migrate TimeWindows.of() and SessionWindows.with() keeping their grace period

Proprietary

Kafka 4.0 removed TimeWindows.of(Duration), SessionWindows.with(Duration) and their grace(Duration) methods, and Kafka 3.0 their long overloads and TimeWindows.advanceBy(long), which become Duration.ofMillis(...). An explicit grace period moves into ofSizeAndGrace / ofInactivityGapAndGrace. Without one, the removed factories applied a grace period of 24 hours less the window size, so that period is kept explicitly rather than switching to ofSizeWithNoGrace, which would drop records that arrive late.

io.moderne.kafka.streams.MigrateWindowsWithDefaultGrace
mod run . --recipe=io.moderne.kafka.streams.MigrateWindowsWithDefaultGrace

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.