conduktor.io ↗

retention.ms — Kafka topic Configuration

This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the "delete" retention policy. This represents an SLA on how soon consumers must read their data.

Description

This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the "delete" retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied. Additionally, retention.ms configuration operates independently of "segment.ms" and "segment.bytes" configurations. Moreover, it triggers the rolling of new segment if the retention.ms condition is satisfied.

Default Values by Kafka Version

Kafka VersionDefault Value
0.11.0604800000
1.0604800000
1.1604800000
2.0604800000
2.1604800000
2.2604800000
2.3604800000
2.4604800000
2.5604800000
2.6604800000 (7 days)
2.7604800000 (7 days)
2.8604800000 (7 days)
3.0604800000 (7 days)
3.1604800000 (7 days)
3.2604800000 (7 days)
3.3604800000 (7 days)
3.4604800000 (7 days)
3.5604800000 (7 days)
3.6604800000 (7 days)
3.7604800000 (7 days)
3.8604800000 (7 days)
3.9604800000 (7 days)
4.0604800000 (7 days)
4.1604800000 (7 days)
4.2604800000 (7 days)
Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.