From cc4a7f01e872e6d0664360d5148af09c876ca72b Mon Sep 17 00:00:00 2001
From: Joyce Fee
+ To enable log cleaning on a particular topic, add the log-specific property
+ Configuring The Log Cleaner
The log cleaner is enabled by default. This will start the pool of cleaner threads.
- To enable log cleaning on a particular topic you can add the log-specific property
- log.cleanup.policy=compact
- This can be done either at topic creation time or using the alter topic command.
- log.cleanup.policy=compact
+
+ The log.cleanup.policy
property is a broker configuration setting defined
+ in the broker's server.properties
file; it affects all of the topics
+ in the cluster that do not have a configuration override in place as documented
+ here.
+
The log cleaner can be configured to retain a minimum amount of the uncompacted "head" of the log. This is enabled by setting the compaction time lag.
log.cleaner.min.compaction.lag.ms
This can be used to prevent messages newer than a minimum message age from being subject to compaction. If not set, all log segments are eligible for compaction except for the last segment, i.e. the one currently
being written to. The active segment will not be compacted even if all of its messages are older than the minimum compaction time lag.
-
Further cleaner configurations are described here.