如果您不对它们进行墓碑处理,KTable 记录何时会过期?

When do KTable records expire if you don't tombstone them?

我有一个主题 T,消息过期 retention.ms 设置为 2 天。该主题已压缩。

如果我将该消息读入 KStream,然后进一步聚合成 KTableKStream and/or KTable 是否会尊重那 2 天到期?当消息不再在主题 T 中时,消息是否也会自动从 KStreamKTable 中删除?或者某些内务处理过程是否需要对这些消息进行逻辑删除?

delete.retention.ms、主题的“脏率”(min.cleanable.dirty.ratio)、min/max 压缩滞后等都是控制键在压缩前保留多长时间的属性

是的,stream/table 应该会自动更新,但是您可能在更新日志主题或状态存储中的其他地方存储了剩余数据,因为这些数据存储在原始主题之外

关于第一个 属性...(来自文档)

gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).

因此,一个 stream/table 的时间延迟小于 delete.retention.ms,那么你应该预计它会消耗墓碑记录,并且如果它 运行 比这个时间长, 然后它会有可能已被删除的数据