2. 2 /
Deleting logs
●The log-deletion strategy is a two-phased approach: first, the logs are rolled into segments,
and then the oldest segments aredeleted.
●Kafka rolls a log when a new message arrives,and its timestamp is greater than the
timestamp of the first messagein the log plus the log.roll.ms configuration value.
3. 3 /
Two options for deleting logs..
●log.roll.ms —This is the primary configuration, but there’s no default value.
●log.roll.hours —This is the secondary configuration, which is only used if log.role.ms isn’t set. It
defaults to 168 hours.
4. 4 /
Deleting logs ...
●Like log rolling, the removal of segments is based on timestamps in the messages and not just the
clock time or time when the file was last modified. Log-segment deletion is based on the largest
timestamp in the log. Here are three settings, listed in order of priority, meaning that configurations
earlier in the list override the later entries:
●log.retention.ms —How long to keepa log file in milliseconds
●log.retention.minutes —How long to keepa log file in minutes
●log.retention.hours —Log file retention inhours
5. 5 /
Size ofSegment
SIZE = log.segment.bytes+ log.retention.bytes
log.retention.bytes is a global configuration. Does this mean that it will sum up all
(inactive)logsegmentsforallthetopicsacrossallbrokers