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.policylog.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.mslog.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.mslog.segment.delete.delay.ms |
60000 |
❌ | ❌ | The time to wait before deleting a file from the filesystem. |
flush.messageslog.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.byteslog.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.byteslog.local.retention.bytes |
-2 |
❌ | ❌ | The maximum size of the log before deleting it. |
local.retention.mslog.local.retention.ms |
-2 |
❌ | ❌ | The maximum time to retain the log before deleting it. |
log.cleaner.max.compaction.lag.msmax.compaction.lag.ms |
9223372036854775807 |
❌ | ❌ | The maximum time a message will remain uncompacted in the log. |
max.message.bytesmessage.max.bytes |
1048588 |
❌ | ❌ | The largest record batch size allowed by Kafka. Records larger than this will be rejected. |
log.message.downconversion.enablemessage.downconversion.enable |
true |
❌ | ❌ | Enables or disables the automatic down-conversion of messages to older message formats for consumers with older clients. |
log.message.format.versionmessage.format.version |
3.0-IV1 |
❌ | ❌ | The message format version used for the topic. |
log.message.timestamp.after.max.msmessage.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.msmessage.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.msmessage.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.typemessage.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.ratiomin.cleanable.dirty.ratio |
0.5 |
❌ | ❌ | The minimum ratio of dirty log to total log for log compaction to start. |
log.cleaner.min.compaction.lag.msmin.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.preallocatepreallocate |
false |
❌ | ❌ | Should preallocate file segments for this topic. |
remote.storage.enable |
false |
❌ | ❌ | Enable the usage of remote storage for this topic. |
log.retention.bytesretention.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.bytessegment.bytes |
1073741824 |
❌ | ❌ | The maximum size of a single log segment file before a new log segment is rolled. |
log.index.size.max.bytessegment.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.
See Also¶
- Declarative Topics - For declarative topic management in application code
- Kafka Cluster Configuration - For cluster-level configuration options
- Admin API - For programmatic topic management operations
Last modified: 2025-11-03 14:04:02