Java 为什么抑制功能不适用于跳转窗口?

Java 为什么抑制功能不适用于跳转窗口?,java,apache-kafka,apache-kafka-streams,Java,Apache Kafka,Apache Kafka Streams,如何让它工作? 我的代码示例: KStream<String, String> finalStream = source .groupByKey() .windowedBy(TimeWindows.of(Duration.ofSeconds(30)).advanceBy(Duration.ofSeconds(10))) .reduce((aggValue, newValue) ->

如何让它工作? 我的代码示例:

KStream<String, String> finalStream = source
                .groupByKey()
                .windowedBy(TimeWindows.of(Duration.ofSeconds(30)).advanceBy(Duration.ofSeconds(10)))
                .reduce((aggValue, newValue) -> newValue, Materialized.with(Serdes.String(), Serdes.String()))
                .suppress(Suppressed.untilWindowCloses(Suppressed.BufferConfig.unbounded()))
                .toStream();
KStream finalStream=源
.groupByKey()
.windowedBy(TimeWindows.of(持续时间秒(30)).advanceBy(持续时间秒(10)))
.reduce((aggValue,newValue)->newValue,物化.with(Serdes.String(),Serdes.String())
.suppress(supprested.untilwindowcloss(supprested.BufferConfig.unbounded()))
.toStream();
运行上面的代码后,输出流为空。没有错误/异常。 注意:使用翻滚窗口,代码按预期工作。
也许我只是用错了?

默认情况下,窗口宽限期是24小时。因此,如果不更改它,
suppress()
在宽限期过去之前不会发出任何数据

您可以通过
时间窗口#宽限期(持续时间)
(cf:)缩短宽限期

顺便说一句:您可能还希望通过以下方式减少这种情况下的存储保留时间(默认情况下也是24小时):

reduce(…,具体化。带保留(持续时间))

请为问题添加背景和详细信息。添加更多详细信息。请复习。非常感谢。