Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For some usages, i.e., join windows in Kafka Streams, it is desirable to have logs that are both compacted and deleted. In these types of applications you may have windows of time with many versions of key, during the window you only want to retain the latest version of the key, however once the window has expired you would like to have the segments for the window deleted. With compact_and_delete enabled retention.ms of the changelog could be set to a value greater than the retention of the window will therefore expired windows will automatically be cleaned up. Kafka doesn’t currently support these semantics as compaction and deletion are exclusive.

This new cleanup.policy will also be useful in other scenarios, i.e., any ingest of data where you only care about the latest value for a particular key, but disk constraints mean you can't keep the entire keyset.


Public Interfaces

New valid option, compact_and_delete, added to the cleanup.policy configuration

...