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

ComponentKafka version lineDocumented default
topic0.11.0604800000
topic1.0604800000
topic1.1604800000
topic2.0604800000
topic2.1604800000
topic2.2604800000
topic2.3604800000
topic2.4604800000
topic2.5604800000
topic2.6604800000 (7 days)
topic2.7604800000 (7 days)
topic2.8604800000 (7 days)
topic3.0604800000 (7 days)
topic3.1604800000 (7 days)
topic3.2604800000 (7 days)
topic3.3604800000 (7 days)
topic3.4604800000 (7 days)
topic3.5604800000 (7 days)
topic3.6604800000 (7 days)
topic3.7604800000 (7 days)
topic3.8604800000 (7 days)
topic3.9604800000 (7 days)
topic4.0604800000 (7 days)
topic4.1604800000 (7 days)
topic4.2604800000 (7 days)
topic4.3604800000 (7 days)
topic4.4604800000 (7 days)
Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.