segment.ms — Kafka topic Configuration
This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. This forces active segment rolling by time, even if the active segment has not reached segment.bytes
Description
This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. This forces active segment rolling by time, even if the active segment has not reached segment.bytes. For compacted topics, max.compaction.lag.ms can trigger active segment rolling sooner: the effective time-based roll threshold is the smaller of segment.ms and max.compaction.lag.ms.
Default Values by Kafka Version
| Component | Kafka version line | Documented default |
|---|---|---|
| topic | 0.11.0 | 604800000 |
| topic | 1.0 | 604800000 |
| topic | 1.1 | 604800000 |
| topic | 2.0 | 604800000 |
| topic | 2.1 | 604800000 |
| topic | 2.2 | 604800000 |
| topic | 2.3 | 604800000 |
| topic | 2.4 | 604800000 |
| topic | 2.5 | 604800000 |
| topic | 2.6 | 604800000 (7 days) |
| topic | 2.7 | 604800000 (7 days) |
| topic | 2.8 | 604800000 (7 days) |
| topic | 3.0 | 604800000 (7 days) |
| topic | 3.1 | 604800000 (7 days) |
| topic | 3.2 | 604800000 (7 days) |
| topic | 3.3 | 604800000 (7 days) |
| topic | 3.4 | 604800000 (7 days) |
| topic | 3.5 | 604800000 (7 days) |
| topic | 3.6 | 604800000 (7 days) |
| topic | 3.7 | 604800000 (7 days) |
| topic | 3.8 | 604800000 (7 days) |
| topic | 3.9 | 604800000 (7 days) |
| topic | 4.0 | 604800000 (7 days) |
| topic | 4.1 | 604800000 (7 days) |
| topic | 4.2 | 604800000 (7 days) |
| topic | 4.3 | 604800000 (7 days) |
| topic | 4.4 | 604800000 (7 days) |