Skip to content

Kafka Log Compaction

Resources

How to trigger log compaction for debugging?

Say, you want to test out whether compaction works as expected on your Kafka topic.

Set these settings:

cleanup.policy=compact

# New segment will be created every 10 seconds
segment.ms = 10000

Trigger cleanup faster
min.cleanable.dirty.ratio=0.001