Skip to content

TopicConfig

TopicConfig is configuration properties of Kafka topics. In other words, TopicConfig is a topic-specific configuration properties (while KafkaConfig is broker-wide).

Tip

While reviewing the source code it can get tricky to find broker-wide properties (e.g. log.cleanup.policy). The reason is that broker-wide properties as split into log. prefix and a corresponding topic-specific property.

A solution is to search for a topic-specific property removing log. prefix.

cleanup.policy

A comma-separated list of cleanup policies:

  • compact
  • delete

Default: delete

Broker-wide configuration: log.cleanup.policy

Used when:

unclean.leader.election.enable

LogConfig