TopicConfig — Topic-Level Configuration Keys

TopicConfig are the keys for a topic-level configuration of a topic (and override cluster-wide defaults that are mostly different by names with log. prefix).

Note
As the TopicConfig itself says: "Eventually this should replace LogConfig.scala."

Import org.apache.kafka.common.config.TopicConfig to reference the keys.

import org.apache.kafka.common.config.TopicConfig
assert(TopicConfig.CLEANUP_POLICY_CONFIG == "cleanup.policy")
Table 1. Keys
Name Description

CLEANUP_POLICY_CONFIG

cleanup.policy

Used when:

  • LogConfig is requested for LogConfig.CleanupPolicyProp

  • (Kafka Streams) RepartitionTopicConfig is requested for REPARTITION_TOPIC_DEFAULT_OVERRIDES

  • (Kafka Streams) UnwindowedChangelogTopicConfig is requested for UNWINDOWED_STORE_CHANGELOG_TOPIC_DEFAULT_OVERRIDES

  • (Kafka Streams) WindowedChangelogTopicConfig is requested for WINDOWED_STORE_CHANGELOG_TOPIC_DEFAULT_OVERRIDES

COMPRESSION_TYPE_CONFIG

compression.type

DELETE_RETENTION_MS_CONFIG

delete.retention.ms

FILE_DELETE_DELAY_MS_CONFIG

file.delete.delay.ms

FLUSH_MESSAGES_INTERVAL_CONFIG

flush.messages

FLUSH_MS_CONFIG

flush.ms

INDEX_INTERVAL_BYTES_CONFIG

index.interval.bytes

MAX_COMPACTION_LAG_MS_CONFIG

max.compaction.lag.ms

MAX_MESSAGE_BYTES_CONFIG

max.message.bytes

MESSAGE_DOWNCONVERSION_ENABLE_CONFIG

message.downconversion.enable

MESSAGE_FORMAT_VERSION_CONFIG

message.format.version

MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG

message.timestamp.difference.max.ms

MESSAGE_TIMESTAMP_TYPE_CONFIG

message.timestamp.type

MIN_CLEANABLE_DIRTY_RATIO_CONFIG

min.cleanable.dirty.ratio

MIN_COMPACTION_LAG_MS_CONFIG

min.compaction.lag.ms

MIN_IN_SYNC_REPLICAS_CONFIG

PREALLOCATE_CONFIG

preallocate

RETENTION_BYTES_CONFIG

Maximum size (in bytes) of a partition to grow before discarding old log segments and free up space for topics with delete retention policy.

Default: -1L (no size limit)

By default there is no size limit only a time limit. Since this limit is enforced at the partition level, multiply it by the number of partitions to compute the topic retention in bytes.

Cluster-wide property: log.retention.bytes

Used exclusively when Log is requested to deleteRetentionSizeBreachedSegments

RETENTION_MS_CONFIG

retention.ms

SEGMENT_BYTES_CONFIG

Used when:

  • (Kafka Streams) StreamsConfig is requested to getMainConsumerConfigs

  • (Kafka Streams) RepartitionTopicConfig is requested for REPARTITION_TOPIC_DEFAULT_OVERRIDES

SEGMENT_INDEX_BYTES_CONFIG

SEGMENT_JITTER_MS_CONFIG

segment.jitter.ms

SEGMENT_MS_CONFIG

segment.ms

UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG

unclean.leader.election.enable

results matching ""

    No results matching ""