How can I guarantee that magazines are kept forever in Kafka?

I need to configure Kafka to never delete logs. Looking at their documentation, I see two kinds of parameters that control this:

My question is:

What is the relationship between these two mechanisms, are they the only two, and are the above settings necessary and sufficient to prevent the deletion of logs?

+5
source share
1 answer

Not sure which version you are using. For me, I use this:

 log.retention.hours=2147483647 

It is approximately 245,000 years old. I believe that at some point I tried -1 , but used the maximum value. Perhaps log.retention.ms takes different values, but independently - the second of your configuration options should be sufficient. My guess is that no option is needed; either will be enough. Of course, the second in itself is enough.

+5
source

All Articles