Skip to main content

Topic Settings

You can view and modify the settings of the current topic. Each topic setting has a default value, which can be overridden per topic.

topic_details_settings

Experiencing difficulties in Topic Settings?

By disabling the toggle, you can view the detailed descriptions for each topic setting. Use these descriptions as reference to modify your topic settings.

topic_settings_toggle

Basic Settings

These are the basic settings configuring a topic. To change the Topic Name, you will need to delete and recreate the topic.

topic_settings_basic_settings

Frequently Used Settings

We have compiled the commonly used configurations for creating a topic.

topic_settings_frequently_settings

SectionSettingValueDefault
ReplicationMinimum insync replicasmin.insync.replicas1
Manage DiskClean-up policycleanup.policy'delete', 'compact', 'delete, compact (both)'
Manage DiskTime to retain dataretention.ms604800000 ms (7 days)
MessageMaximum message size in bytesmax.message.bytes1048588 bytes (1MB)
SegmentSegment timesegment.ms604800000 ms (1 week)
Estimating Topic Size

A tool is provided to easily calculate the estimated size of the topic after its settings are changed. This allows you to check in advance the impact of the altered topic settings.

Advanced Mode

Replication

In the Replication Section, you can view and modify the replication settings of a topic. Replication settings are crucial for preventing data loss and ensuring data stability.

SettingValueDefault
Minimum insync replicasmin.insync.replicas1
Throttled replicas (leader side)leader.replication.throttled.replicas"" ([partitionId]:[brokerId],...)
Throttled replicas (follower side)follower.replication.throttled.replicas"" ([partitionId]:[brokerId],...)

Manage Disk

Manage Disk Section includes settings for managing the retention and deletion methods of log data in Kafka. Manage Disk settings are important for optimizing Kafka's storage usage, and efficiently processing old data.

SettingValueDefault (Option and Unit)
Clean-up policycleanup.policy'delete', 'compact', 'delete,compact (both)'
Bytes to retain dataretention.bytes-1 (no limit)
Time to retain dataretention.ms604800000 ms (7 days)

Clean-up Policy: compact Option

In Manage Disk Section > Clean-up policy settings, the additional settings applied when selecting the 'compact' option, control the detailed behavior of the log segment compaction process. Message Compaction removes duplicate key messages from the messages containing key-value pair data, and retains only the latest message for each key, thereby using disk space more efficiently. This is particularly useful for applications that store status information (such as user sessions, event progress, etc.) and contributes to more efficient data retention and improved query performance.

SettingValueDefault
Time to retain delete tombstone markersdelete.retention.ms86400000 ms (24 hours)
Maximum time to retain ineligible messages before compactionmax.compaction.lag.ms9223372036854775807 ms (about 292 years)
Minimum time to retain ineligible messages before compactionmin.compaction.lag.ms0 ms
Cleaning Frequencymin.cleanable.dirty.ratio0.5 (50%)

Message

Message Section includes detailed settings related to message processing.

SettingValueDefault
Maximum message size in bytesmax.message.bytes1048588 bytes (1MB)
Message format versionmessage.format.versionSame version as Kafka Cluster
Message timestamp typemessage.timestamp.type'CreateTime', 'LogAppendTime'
Maximum difference allowed between the timestampmessage.timestamp.difference.max.ms9223372036854775807 ms (about 292 years)
Down-conversion of messagemessage.downconversion.enabletrue, false
Compression typecompression.type'uncompressed', 'zstd', 'lz4', 'snappy', 'gzip', 'producer'

Flush

Flush Section determines how frequently messages will be written to disk.

SettingValueDefault
Flush messagesflush.messages9223372036854775807 ms (about 292 years)
Time to flush messageflush.ms9223372036854775807 ms (about 292 years)
What is a Flush?

A flush refers to the process of writing messages to the disk. Kafka first writes messages to memory, and then after a certain amount of time or a certain number of messages have accumulated, it writes the messages to the disk.

Segment

Segment Section deals with settings closely related to Kafka's data storage methods. Kafka stores data in file units called log segments, which make up the partitions of a topic. By configuring segment settings, you can adjust Kafka's storage efficiency, data access speed, and overall system performance. This section includes key settings such as segment creation, rolling, deletion, and indexing.

SettingValueDefault
Maximum random jittersegment.jitter.ms0 ms
Segment file sizesegment.bytes1073741824 bytes (1.07GB)
Segment timesegment.ms604800000 ms (1 week)
Segment indexsegment.index.bytes10485760 bytes (10.49MB)
Time to delete filefile.delete.delay.ms60000 ms (1 minute)
Preallocate a new segmentpreallocatetrue, false

Others

SettingValueDefault
Unclean leader selectionunclean.leader.election.enabletrue, false
Offset intervalindex.interval.bytes4096 bytes (4KB)