BeginnerCore Concepts
What is the default log retention period in Kafka?
Reference answer
The default log retention period in Kafka is 7 days (168 hours), set by log.retention.ms=604800000 at the broker level. This can be overridden per-topic with retention.ms. Kafka also supports size-based retention via retention.bytes (default -1, unlimited). Note that Kafka deletes at the segment granularity — a segment is only eligible for deletion when ALL its messages have expired. The actual disk space freed may lag slightly behind the retention period.
Expected key concepts: 7 days, log.retention.ms, 604800000, retention.ms, retention.bytes, segment, eligible for deletion, disk space