Topic Configuration Properties

A topic-level property sets a Redpanda or Kafka configuration for a particular topic.

Many topic-level properties have corresponding cluster properties that set a default value for all topics of a cluster. To customize the value for a topic, you can set a topic-level property that overrides the value of the corresponding cluster property.

For information on how to configure topic properties, see Configure Topic Properties.

All topic properties take effect immediately after being set. Do not modify properties on internal Redpanda topics (such as __consumer_offsets, _schemas, or other system topics) as this can cause cluster instability.

Retention and Compaction Properties

These properties control how data is stored, for how long, and when it is deleted or compacted.

cleanup.policy

The cleanup policy to apply for log segments of a topic. When cleanup.policy is set, it overrides the cluster property log_cleanup_policy for the topic.

Values:

  • delete - Deletes data according to size-based or time-based retention limits, or both.

  • compact - Deletes data according to a key-based retention policy, discarding all but the latest value for each key.

  • compact,delete - The latest values are kept for each key, while the remaining data is deleted according to retention limits.

Property Value

Type

string (enum)

Accepted Values

none, delete, compact

Corresponding cluster property

Default

delete

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

compaction.strategy

Specifies the strategy used to determine which records to remove during log compaction. The compaction strategy controls how Redpanda identifies and removes duplicate records while preserving the latest value for each key.

Property Value

Type

string

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

delete.retention.ms

The retention time for tombstone records in a compacted topic. Redpanda removes tombstone records after the retention limit is exceeded.

If you have enabled Tiered Storage and set redpanda.remote.read or redpanda.remote.write for the topic, you cannot enable tombstone removal.

If both delete.retention.ms and the cluster property tombstone_retention_ms are set, delete.retention.ms overrides the cluster level tombstone retention for an individual topic.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

max.compaction.lag.ms

The maximum amount of time (in ms) that a log segment can remain unaltered before it is eligible for compaction in a compact topic. Overrides the cluster property max_compaction_lag_ms for the topic.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

9223372036854

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

min.cleanable.dirty.ratio

The minimum ratio between the number of bytes in dirty segments and the total number of bytes in closed segments that must be reached before a partition’s log is eligible for compaction in a compact topic.

Property Value

Type

number

Accepted values

[0, 1.0]

Corresponding cluster property

Default

0.2

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

min.compaction.lag.ms

The minimum amount of time (in ms) that a log segment must remain unaltered before it can be compacted in a compact topic. Overrides the cluster property min_compaction_lag_ms for the topic.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

0 (0 milliseconds)

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

retention.bytes

A size-based retention limit that configures the maximum size that a topic partition can grow before becoming eligible for cleanup.

If retention.bytes is set to a positive value, it overrides the cluster property retention_bytes for the topic, and the total retained size for the topic is retention.bytes multiplied by the number of partitions for the topic.

When both size-based (retention.bytes) and time-based (retention.ms) retention limits are set, cleanup occurs when either limit is reached.

Property Value

Type

integer

Accepted values

bytes (integer)

Corresponding cluster property

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

retention.ms

A time-based retention limit that configures the maximum duration that a log’s segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its retention.ms elapses, otherwise the segment may be compacted and/or deleted. If a non-positive value, no per-topic limit is applied.

If retention.ms is set to a positive value, it overrides the cluster property log_retention_ms for the topic.

When both size-based (retention.bytes) and time-based (retention.ms) retention limits are set, the earliest occurring limit applies.

Property Value

Type

retention_duration_property

Corresponding cluster property

Default

604800000 (1 week)

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

Segment and Message Properties

These properties control the size and lifecycle of log segment files and settings for individual messages.

compression.type

Redpanda ignores this property and always uses producer compression semantics. If producers send compressed data, Redpanda stores and serves it as-is. If producers send uncompressed data, Redpanda stores it uncompressed.

This property exists for Apache Kafka compatibility. Configure compression in your producers instead of using this topic property.

Compression reduces message size and improves throughput, but increases CPU utilization. Enable producer batching to increase compression efficiency.

When set, this property overrides the cluster property log_compression_type for the topic.

Property Value

Type

string (enum)

Accepted Values

none, gzip, snappy, lz4, zstd, count, producer

Corresponding cluster property

Default

producer

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

max.message.bytes

The maximum size of a message or batch of a topic. If a compression type is enabled, max.message.bytes sets the maximum size of the compressed message or batch.

If max.message.bytes is set to a positive value, it overrides the cluster property kafka_batch_max_bytes for the topic.

Set an upper limit for max.message.bytes using the cluster property kafka_max_message_size_upper_limit_bytes.

Property Value

Type

integer

Accepted values

bytes (integer)

Corresponding cluster property

Default

1048576

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

message.timestamp.type

The source of a message’s timestamp: either the message’s creation time or its log append time.

When message.timestamp.type is set, it overrides the cluster property log_message_timestamp_type for the topic.

Property Value

Type

string (enum)

Accepted Values

CreateTime, LogAppendTime

Corresponding cluster property

Default

CreateTime

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

segment.bytes

The maximum size of an active log segment for a topic. When the size of an active segment exceeds segment.bytes, the segment is closed and a new active segment is created. The closed, inactive segment is then eligible to be cleaned up according to retention properties.

When segment.bytes is set to a positive value, it overrides the cluster property:

Property Value

Type

integer

Accepted values

bytes (integer)

Corresponding cluster property

Default

134217728

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

segment.ms

The maximum duration that a log segment of a topic is active (open for writes and not deletable). A periodic event, with segment.ms as its period, forcibly closes the active segment and transitions, or rolls, to a new active segment. The closed (inactive) segment is then eligible to be cleaned up according to cleanup and retention properties.

If set to a positive duration, segment.ms overrides the cluster property log_segment_ms. Values are automatically clamped between the cluster bounds set by log_segment_ms_min (default: 10 minutes) and log_segment_ms_max (default: 1 year). If your configured value exceeds these bounds, Redpanda uses the bound value and logs a warning. Check current cluster bounds with rpk cluster config get log_segment_ms_min log_segment_ms_max.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

2 weeks

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

Performance and Cluster Properties

These properties control disk flushing, replication, and how topics interact with the cluster.

flush.bytes

The maximum bytes not fsynced per partition. If this configured threshold is reached, the log is automatically fsynced, even though it wasn’t explicitly requested.

Property Value

Type

integer

Accepted values

bytes (integer)

Corresponding cluster property

Default

262144

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

flush.ms

The maximum delay (in ms) between two subsequent fsyncs. After this delay, the log is automatically fsynced.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

100 (100 milliseconds)

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.leaders.preference

The preferred location (rack) for partition leaders of a topic.

This property inherits the value from the default_leaders_preference cluster configuration property. You may override the cluster-wide setting by specifying the value for individual topics.

If the cluster configuration property enable_rack_awareness is set to false, Leader Pinning is disabled across the cluster.

Property Value

Type

object

Corresponding cluster property

Default

none

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

replication.factor

The number of replicas of a topic to save in different nodes (brokers) of a cluster.

If replication.factor is set to a positive value, it overrides the cluster property default_topic_replication for the topic.

Although replication.factor isn’t returned or displayed by rpk topic describe as a valid Kafka property, you can set it using rpk topic alter-config. When the replication.factor of a topic is altered, it isn’t simply a property value that’s updated, but rather the actual replica sets of topic partitions that are changed.
Property Value

Type

integer

Accepted values

integer (1 or greater)

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

write.caching

The write caching mode to apply to a topic.

When write.caching is set, it overrides the cluster property write_caching_default. Write caching acknowledges a message as soon as it is received and acknowledged on a majority of brokers, without waiting for it to be written to disk. With acks=all, this provides lower latency while still ensuring that a majority of brokers acknowledge the write. Fsyncs follow flush.ms and flush.bytes, whichever is reached first.

Property Value

Type

string (enum)

Accepted Values

true, false, disabled

Corresponding cluster property

Default

false

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

Tiered Storage properties

Configure properties to manage topics for Tiered Storage.

initial.retention.local.target.bytes

A size-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If null (default), all locally retained data is transferred.

Property Value

Type

integer

Accepted values

bytes (integer)

Corresponding cluster property

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

initial.retention.local.target.ms

A time-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If null (default), all locally retained data is transferred.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.remote.delete

A flag that enables deletion of data from object storage for Tiered Storage when it’s deleted from local storage for a topic.

redpanda.remote.delete doesn’t apply to Remote Read Replica topics: a Remote Read Replica topic isn’t deleted from object storage when this flag is true.
Property Value

Type

boolean

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.remote.read

A flag for enabling Redpanda to fetch data for a topic from object storage to local storage. When set to true together with redpanda.remote.write, it enables the Tiered Storage feature.

Property Value

Type

boolean

Corresponding cluster property

Default

false

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.remote.recovery

A flag that enables the recovery or reproduction of a topic from object storage for Tiered Storage. The recovered data is saved in local storage, and the maximum amount of recovered data is determined by the local storage retention limits of the topic.

You can only configure redpanda.remote.recovery when you create a topic. You cannot apply this setting to existing topics.
Property Value

Type

boolean

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.remote.write

A flag for enabling Redpanda to upload data for a topic from local storage to object storage. When set to true together with redpanda.remote.read, it enables the Tiered Storage feature.

Property Value

Type

boolean

Corresponding cluster property

Default

false

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

retention.local.target.bytes

A size-based retention limit for Tiered Storage that configures the maximum size that a topic partition in local storage can grow before becoming eligible for cleanup. It applies per partition and is equivalent to retention.bytes without Tiered Storage.

Property Value

Type

integer

Accepted values

bytes (integer)

Corresponding cluster property

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

retention.local.target.ms

A time-based retention limit for Tiered Storage that sets the maximum duration that a log’s segment file for a topic is retained in local storage before it’s eligible for cleanup. This property is equivalent to retention.ms without Tiered Storage.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Corresponding cluster property

Default

86400000 (1 day)

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

Remote Read Replica properties

Configure properties to manage topics for Remote Read Replicas.

redpanda.remote.readreplica

The name of the object storage bucket for a Remote Read Replica topic.

Setting redpanda.remote.readreplica together with either redpanda.remote.read or redpanda.remote.write results in an error.
Property Value

Type

string

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

Apache Iceberg integration properties

Integrate Redpanda topics as Iceberg tables.

redpanda.iceberg.delete

Whether the corresponding Iceberg table is deleted upon deleting the topic.

Property Value

Type

boolean

Corresponding cluster property

Default

true

Nullable

No

Restored on Whole Cluster Restore

Yes

redpanda.iceberg.invalid.record.action

Whether to write invalid records to a dead-letter queue (DLQ).

Property Value

Type

string (enum)

Accepted Values

drop, dlq_table

Corresponding cluster property

Default

dlq_table

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.iceberg.mode

Enable the Iceberg integration for the topic. You can choose one of four modes.

Property Value

Type

string

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.iceberg.partition.spec

The partitioning specification for the Iceberg table.

Property Value

Type

string

Corresponding cluster property

Default

(hour(redpanda.timestamp))

Nullable

No

Restored on Whole Cluster Restore

Yes

Related topics

redpanda.iceberg.target.lag.ms

Controls how often the data in the Iceberg table is refreshed with new data from the topic. Redpanda attempts to commit all data produced to the topic within the lag target, subject to resource availability.

Property Value

Type

integer

Accepted values

milliseconds (integer)

Default

null

Nullable

No

Restored on Whole Cluster Restore

Yes