简体   繁体   English

Kafka Streams - 具有未压缩主题的 KStream

[英]Kafka Streams - KStream with uncompacted topic

Just followup question with respect to Kafka - uncompacted topics Vs compacted topics只是关于Kafka 的后续问题 - 未压缩主题与压缩主题

As said there,正如那里所说,

Streams can be thought of as inserts in database parlance.流可以被认为是数据库用语中的插入。 Each distinct record remains in this view of the log.每个不同的记录都保留在此日志视图中。 Streams are usually built from uncompacted topics.流通常由未压缩的主题构建。

As best practice, About the semantics of uncompacted topic, should the topic in question to be un compacted as in the log enabler should be disabled so that the compaction( cleaning ) will not happen, with property such as作为最佳实践,关于未压缩主题的语义,是否应禁用日志启用程序中未压缩的主题,以便不会发生压缩(清理),其属性如下

log.cleaner.enable = false or log.cleaner.enable = true (default) with clean up policy as "delete"(default) log.cleaner.enable = false 或 log.cleaner.enable = true(默认),清理策略为“删除”(默认)

Log Cleaner will not affect the performance of reading/writing from topics as they are a collection of background threads. Log Cleaner 不会影响从主题读取/写入的性能,因为它们是后台线程的集合。

Therefore it is not necessary to disable log cleaning.因此没有必要禁用日志清理。 Also, you may have some topics that use a delete policy and some topics that use a compact policy.此外,您可能有一些使用删除策略的主题和一些使用紧凑策略的主题。

Please note that any state stores you create and use are backed by compacted topics.请注意,您创建和使用的任何 state 存储都由压缩主题支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM