Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indefinite log retention on kafka

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

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?

like image 936
Fajarmf Avatar asked Jan 08 '23 11:01

Fajarmf


1 Answers

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

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

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

like image 57
phill.tomlinson Avatar answered Jan 16 '23 00:01

phill.tomlinson