使Kafka主题日志永久保留 [英] Make Kafka Topic Log Retention Permanent

查看:232
本文介绍了使Kafka主题日志永久保留的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将日志消息写入Kafka主题,并且希望该主题永久保留.我在Kafka和Kafka Connect(_schemas,connect-configs,connect-status,connect-offsets等)中看到,有一些特殊的主题不会被日志保留时间删除.如何将一个主题强制为与其他特殊主题一样?是命名约定还是其他一些属性?

I am writing log messages into a Kafka Topic and I want the retention of this topic to be permanent. I have seen in Kafka and Kafka Connect (_schemas, connect-configs, connect-status, connect-offsets, etc) that there are special topics that are not deleted by the log retention time. How do I enforce a topic to be like these other special topics? Is it the naming convention or some other properties?

谢谢

推荐答案

这些特殊主题是紧凑主题.这意味着它们由带密钥的消息组成,并且仅保留列表的最新密钥.在此处全文.在大多数情况下,这可能是无限保留时间所需要的.

These special topics are compacted topics. This means they are made up of keyed messages and only keep the list recent key. A full write here. This is probably what you want for infinite retention time in most cases.

这篇关于使Kafka主题日志永久保留的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆