卡夫卡上的不确定日志保留 [英] Indefinite log retention on kafka

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

问题描述

我正在使用kafka进行活动采购.我意识到我们仍然需要配置日志保留时间,即 log.retention.hours .

I am using kafka for event-sourcing. I realized that we still need to configure the log retention time, i.e. log.retention.hours.

如果我想无限期地保存所有消息,那么使用的最佳值是什么? log.retention.bytes 的示例配置设置为-1,我是否还可以在 log.retention.hours 中使用-1?

What is the best value to use if I want to keep all my messages indefinitely? The sample configuration for log.retention.bytes is set to -1, can I use -1 also in the log.retention.hours?

推荐答案

请参阅以下Kafka JIRA 将于0.9.0.0版本发布.根据建议暂时设置:

See the following Kafka JIRA which is due for the 0.9.0.0 release. For the time being set as suggested:

log.retention.bytes = -1
log.retention.hours = 2147483647

与永远(〜25万年)相同.

Which is the same as forever (~250K years).

然后,当0.9.0.0版本可用时, log.retention.hours 应该具有类似的 -1 值.

And then when the 0.9.0.0 release is available the log.retention.hours should have similar -1 value available.

这篇关于卡夫卡上的不确定日志保留的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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