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

查看:36
本文介绍了使 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天全站免登陆