Skip to content

Kafka Topic Configuration

Kafka Configuration Variability

The defaults and exact list of per-topic configuration options may differ between various Kafka versions. For the most accurate information, please refer to the documentation for the specific Kafka version.

Names Default Value Read-Only Sensitive Description
cleanup.policy
log.cleanup.policy
delete The policy to use for log cleanup. The default is 'delete' which removes old log segments. 'compact' is for log compaction.
compression.type producer Specify the final compression type for a given topic. Valid values are 'uncompressed', 'zstd', 'lz4', 'gzip', and 'snappy'.
delete.retention.ms
log.cleaner.delete.retention.ms
86400000 The amount of time to retain delete markers in log compacted topics. This is also the time to retain tombstone messages in topics without log compaction.
file.delete.delay.ms
log.segment.delete.delay.ms
60000 The time to wait before deleting a file from the filesystem.
flush.messages
log.flush.interval.messages
9223372036854775807 The number of messages to accept before forcing a flush of data to disk.
flush.ms 9223372036854775807 The maximum time in milliseconds to wait before forcing a flush of data to disk.
follower.replication.throttled.replicas A list of replica IDs that will be throttled on replication.
index.interval.bytes
log.index.interval.bytes
4096 The interval with which Kafka adds an entry to the offset index.
leader.replication.throttled.replicas A list of replica IDs that will be throttled on replication.
local.retention.bytes
log.local.retention.bytes
-2 The maximum size of the log before deleting it.
local.retention.ms
log.local.retention.ms
-2 The maximum time to retain the log before deleting it.
log.cleaner.max.compaction.lag.ms
max.compaction.lag.ms
9223372036854775807 The maximum time a message will remain uncompacted in the log.
max.message.bytes
message.max.bytes
1048588 The largest record batch size allowed by Kafka. Records larger than this will be rejected.
log.message.downconversion.enable
message.downconversion.enable
true Enables or disables the automatic down-conversion of messages to older message formats for consumers with older clients.
log.message.format.version
message.format.version
3.0-IV1 The message format version used for the topic.
log.message.timestamp.after.max.ms
message.timestamp.after.max.ms
9223372036854775807 The maximum difference allowed between the timestamp of a message and the log append time.
log.message.timestamp.before.max.ms
message.timestamp.before.max.ms
9223372036854775807 The maximum difference allowed between the timestamp of a message and the current time before the message is rejected.
log.message.timestamp.difference.max.ms
message.timestamp.difference.max.ms
9223372036854775807 The maximum difference allowed between the timestamp of a message as set by the producer and the log append time.
log.message.timestamp.type
message.timestamp.type
CreateTime Define whether the timestamp in the message is set by the create time or the log append time.
log.cleaner.min.cleanable.ratio
min.cleanable.dirty.ratio
0.5 The minimum ratio of dirty log to total log for log compaction to start.
log.cleaner.min.compaction.lag.ms
min.compaction.lag.ms
0 The minimum time a message will remain uncompacted in the log.
min.insync.replicas 1 When a producer sets acks to 'all', the minimum number of replicas that must acknowledge a write for it to be considered successful.
log.preallocate
preallocate
false Should preallocate file segments for this topic.
remote.storage.enable false Enable the usage of remote storage for this topic.
log.retention.bytes
retention.bytes
-1 The maximum size of the log before deleting it.
retention.ms 604800000 The maximum time to retain the log before deleting it.
log.segment.bytes
segment.bytes
1073741824 The maximum size of a single log segment file before a new log segment is rolled.
log.index.size.max.bytes
segment.index.bytes
10485760 The maximum size of the offset index that Kafka will allow before a new log segment is rolled.
segment.jitter.ms 0 The maximum jitter to add to log segment roll time.
segment.ms 604800000 The maximum time to retain a log segment before rolling it.
unclean.leader.election.enable false Indicates whether unclean leader election is enabled for the topic.

Legend

  • Names: The name of the parameter or setting with its synonyms.
  • Default Value: The initial value assigned to the parameter if not explicitly set.
  • Read-Only: Indicates if the parameter is immutable and cannot be modified.
  • Sensitive: Specifies if the parameter contains sensitive information that will not be accessible or visible using Karafka.
  • Description: A detailed explanation of the parameter's purpose and usage.