I have written this code in a Kafka stream application:
KGroupedStream<String, foo> groupedStream = stream.groupByKey();
groupedStream.windowedBy(
SessionWindows.with(Duration.ofSeconds(3)).grace(Duration.ofSeconds(3)))
.aggregate(() -> {...})
.suppress(Suppressed.untilWindowCloses(unbounded()))
.toStream()...
which should (if i understood it correctly) emit records per Key after the window is closed. Somehow the behavior is the following:
The stream doesn't emit the first record and only forward it after the second record even with a different Key and then the second record is emitted only after the 3rd and so forth..
I have tried multiple StreamConfigs with "exactly_once" and with or without Caching also, this behavior persists.
Thanks in advance for your help !