published on Friday, Jul 3, 2026 by Pulumi
published on Friday, Jul 3, 2026 by Pulumi
Creates and manages an Aiven for Apache Kafka® topic. If this resource is missing (for example, after a service power off), it’s removed from the state and a new create plan is generated.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const example = new aiven.KafkaTopic("example", {
project: "my-project",
serviceName: "my-kafka",
topicName: "mytopic",
partitions: 3,
replication: 3,
ownerUserGroupId: "ug22ba494e096",
config: {
cleanupPolicy: "delete",
compressionType: "zstd",
deleteRetentionMs: "86400000",
disklessEnable: false,
fileDeleteDelayMs: "60000",
flushMessages: "9223372036854775807",
flushMs: "9223372036854775807",
indexIntervalBytes: "4096",
localRetentionBytes: "1073741824",
localRetentionMs: "300000",
maxCompactionLagMs: "86400000",
maxMessageBytes: "1048588",
messageDownconversionEnable: true,
messageFormatVersion: "2.7-IV2",
messageTimestampAfterMaxMs: "3600000",
messageTimestampBeforeMaxMs: "9223372036854775807",
messageTimestampDifferenceMaxMs: "9223372036854775807",
messageTimestampType: "CreateTime",
minCleanableDirtyRatio: 0.5,
minCompactionLagMs: "0",
minInsyncReplicas: "2",
preallocate: false,
remoteStorageEnable: false,
retentionBytes: "-1",
retentionMs: "604800000",
segmentBytes: "1073741824",
segmentIndexBytes: "10485760",
segmentJitterMs: "0",
segmentMs: "604800000",
uncleanLeaderElectionEnable: false,
},
tags: [{
key: "My-tag_key",
value: "My tag value, value.",
}],
topicDescription: "Platform events",
});
import pulumi
import pulumi_aiven as aiven
example = aiven.KafkaTopic("example",
project="my-project",
service_name="my-kafka",
topic_name="mytopic",
partitions=3,
replication=3,
owner_user_group_id="ug22ba494e096",
config={
"cleanup_policy": "delete",
"compression_type": "zstd",
"delete_retention_ms": "86400000",
"diskless_enable": False,
"file_delete_delay_ms": "60000",
"flush_messages": "9223372036854775807",
"flush_ms": "9223372036854775807",
"index_interval_bytes": "4096",
"local_retention_bytes": "1073741824",
"local_retention_ms": "300000",
"max_compaction_lag_ms": "86400000",
"max_message_bytes": "1048588",
"message_downconversion_enable": True,
"message_format_version": "2.7-IV2",
"message_timestamp_after_max_ms": "3600000",
"message_timestamp_before_max_ms": "9223372036854775807",
"message_timestamp_difference_max_ms": "9223372036854775807",
"message_timestamp_type": "CreateTime",
"min_cleanable_dirty_ratio": 0.5,
"min_compaction_lag_ms": "0",
"min_insync_replicas": "2",
"preallocate": False,
"remote_storage_enable": False,
"retention_bytes": "-1",
"retention_ms": "604800000",
"segment_bytes": "1073741824",
"segment_index_bytes": "10485760",
"segment_jitter_ms": "0",
"segment_ms": "604800000",
"unclean_leader_election_enable": False,
},
tags=[{
"key": "My-tag_key",
"value": "My tag value, value.",
}],
topic_description="Platform events")
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.NewKafkaTopic(ctx, "example", &aiven.KafkaTopicArgs{
Project: pulumi.String("my-project"),
ServiceName: pulumi.String("my-kafka"),
TopicName: pulumi.String("mytopic"),
Partitions: pulumi.Int(3),
Replication: pulumi.Int(3),
OwnerUserGroupId: pulumi.String("ug22ba494e096"),
Config: &aiven.KafkaTopicConfigArgs{
CleanupPolicy: pulumi.String("delete"),
CompressionType: pulumi.String("zstd"),
DeleteRetentionMs: pulumi.String("86400000"),
DisklessEnable: pulumi.Bool(false),
FileDeleteDelayMs: pulumi.String("60000"),
FlushMessages: pulumi.String("9223372036854775807"),
FlushMs: pulumi.String("9223372036854775807"),
IndexIntervalBytes: pulumi.String("4096"),
LocalRetentionBytes: pulumi.String("1073741824"),
LocalRetentionMs: pulumi.String("300000"),
MaxCompactionLagMs: pulumi.String("86400000"),
MaxMessageBytes: pulumi.String("1048588"),
MessageDownconversionEnable: pulumi.Bool(true),
MessageFormatVersion: pulumi.String("2.7-IV2"),
MessageTimestampAfterMaxMs: pulumi.String("3600000"),
MessageTimestampBeforeMaxMs: pulumi.String("9223372036854775807"),
MessageTimestampDifferenceMaxMs: pulumi.String("9223372036854775807"),
MessageTimestampType: pulumi.String("CreateTime"),
MinCleanableDirtyRatio: pulumi.Float64(0.5),
MinCompactionLagMs: pulumi.String("0"),
MinInsyncReplicas: pulumi.String("2"),
Preallocate: pulumi.Bool(false),
RemoteStorageEnable: pulumi.Bool(false),
RetentionBytes: pulumi.String("-1"),
RetentionMs: pulumi.String("604800000"),
SegmentBytes: pulumi.String("1073741824"),
SegmentIndexBytes: pulumi.String("10485760"),
SegmentJitterMs: pulumi.String("0"),
SegmentMs: pulumi.String("604800000"),
UncleanLeaderElectionEnable: pulumi.Bool(false),
},
Tags: aiven.KafkaTopicTagArray{
&aiven.KafkaTopicTagArgs{
Key: pulumi.String("My-tag_key"),
Value: pulumi.String("My tag value, value."),
},
},
TopicDescription: pulumi.String("Platform events"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var example = new Aiven.KafkaTopic("example", new()
{
Project = "my-project",
ServiceName = "my-kafka",
TopicName = "mytopic",
Partitions = 3,
Replication = 3,
OwnerUserGroupId = "ug22ba494e096",
Config = new Aiven.Inputs.KafkaTopicConfigArgs
{
CleanupPolicy = "delete",
CompressionType = "zstd",
DeleteRetentionMs = "86400000",
DisklessEnable = false,
FileDeleteDelayMs = "60000",
FlushMessages = "9223372036854775807",
FlushMs = "9223372036854775807",
IndexIntervalBytes = "4096",
LocalRetentionBytes = "1073741824",
LocalRetentionMs = "300000",
MaxCompactionLagMs = "86400000",
MaxMessageBytes = "1048588",
MessageDownconversionEnable = true,
MessageFormatVersion = "2.7-IV2",
MessageTimestampAfterMaxMs = "3600000",
MessageTimestampBeforeMaxMs = "9223372036854775807",
MessageTimestampDifferenceMaxMs = "9223372036854775807",
MessageTimestampType = "CreateTime",
MinCleanableDirtyRatio = 0.5,
MinCompactionLagMs = "0",
MinInsyncReplicas = "2",
Preallocate = false,
RemoteStorageEnable = false,
RetentionBytes = "-1",
RetentionMs = "604800000",
SegmentBytes = "1073741824",
SegmentIndexBytes = "10485760",
SegmentJitterMs = "0",
SegmentMs = "604800000",
UncleanLeaderElectionEnable = false,
},
Tags = new[]
{
new Aiven.Inputs.KafkaTopicTagArgs
{
Key = "My-tag_key",
Value = "My tag value, value.",
},
},
TopicDescription = "Platform events",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.KafkaTopic;
import com.pulumi.aiven.KafkaTopicArgs;
import com.pulumi.aiven.inputs.KafkaTopicConfigArgs;
import com.pulumi.aiven.inputs.KafkaTopicTagArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new KafkaTopic("example", KafkaTopicArgs.builder()
.project("my-project")
.serviceName("my-kafka")
.topicName("mytopic")
.partitions(3)
.replication(3)
.ownerUserGroupId("ug22ba494e096")
.config(KafkaTopicConfigArgs.builder()
.cleanupPolicy("delete")
.compressionType("zstd")
.deleteRetentionMs("86400000")
.disklessEnable(false)
.fileDeleteDelayMs("60000")
.flushMessages("9223372036854775807")
.flushMs("9223372036854775807")
.indexIntervalBytes("4096")
.localRetentionBytes("1073741824")
.localRetentionMs("300000")
.maxCompactionLagMs("86400000")
.maxMessageBytes("1048588")
.messageDownconversionEnable(true)
.messageFormatVersion("2.7-IV2")
.messageTimestampAfterMaxMs("3600000")
.messageTimestampBeforeMaxMs("9223372036854775807")
.messageTimestampDifferenceMaxMs("9223372036854775807")
.messageTimestampType("CreateTime")
.minCleanableDirtyRatio(0.5)
.minCompactionLagMs("0")
.minInsyncReplicas("2")
.preallocate(false)
.remoteStorageEnable(false)
.retentionBytes("-1")
.retentionMs("604800000")
.segmentBytes("1073741824")
.segmentIndexBytes("10485760")
.segmentJitterMs("0")
.segmentMs("604800000")
.uncleanLeaderElectionEnable(false)
.build())
.tags(KafkaTopicTagArgs.builder()
.key("My-tag_key")
.value("My tag value, value.")
.build())
.topicDescription("Platform events")
.build());
}
}
resources:
example:
type: aiven:KafkaTopic
properties:
project: my-project
serviceName: my-kafka
topicName: mytopic
partitions: 3
replication: 3 # OPTIONAL FIELDS
ownerUserGroupId: ug22ba494e096
config:
cleanupPolicy: delete
compressionType: zstd
deleteRetentionMs: '86400000'
disklessEnable: false
fileDeleteDelayMs: '60000'
flushMessages: '9223372036854775807'
flushMs: '9223372036854775807'
indexIntervalBytes: '4096'
localRetentionBytes: '1073741824'
localRetentionMs: '300000'
maxCompactionLagMs: '86400000'
maxMessageBytes: '1048588'
messageDownconversionEnable: true
messageFormatVersion: 2.7-IV2
messageTimestampAfterMaxMs: '3600000'
messageTimestampBeforeMaxMs: '9223372036854775807'
messageTimestampDifferenceMaxMs: '9223372036854775807'
messageTimestampType: CreateTime
minCleanableDirtyRatio: 0.5
minCompactionLagMs: '0'
minInsyncReplicas: '2'
preallocate: false
remoteStorageEnable: false
retentionBytes: '-1'
retentionMs: '604800000'
segmentBytes: '1073741824'
segmentIndexBytes: '10485760'
segmentJitterMs: '0'
segmentMs: '604800000'
uncleanLeaderElectionEnable: false
tags:
- key: My-tag_key
value: My tag value, value.
topicDescription: Platform events
pulumi {
required_providers {
aiven = {
source = "pulumi/aiven"
}
}
}
resource "aiven_kafkatopic" "example" {
project = "my-project"
service_name = "my-kafka"
topic_name = "mytopic"
partitions = 3
replication = 3
// OPTIONAL FIELDS
owner_user_group_id = "ug22ba494e096"
config = {
cleanup_policy = "delete"
compression_type = "zstd"
delete_retention_ms = "86400000"
diskless_enable = false
file_delete_delay_ms = "60000"
flush_messages = "9223372036854775807"
flush_ms = "9223372036854775807"
index_interval_bytes = "4096"
local_retention_bytes = "1073741824"
local_retention_ms = "300000"
max_compaction_lag_ms = "86400000"
max_message_bytes = "1048588"
message_downconversion_enable = true
message_format_version = "2.7-IV2"
message_timestamp_after_max_ms = "3600000"
message_timestamp_before_max_ms = "9223372036854775807"
message_timestamp_difference_max_ms = "9223372036854775807"
message_timestamp_type = "CreateTime"
min_cleanable_dirty_ratio = 0.5
min_compaction_lag_ms = "0"
min_insync_replicas = "2"
preallocate = false
remote_storage_enable = false
retention_bytes = "-1"
retention_ms = "604800000"
segment_bytes = "1073741824"
segment_index_bytes = "10485760"
segment_jitter_ms = "0"
segment_ms = "604800000"
unclean_leader_election_enable = false
}
// OPTIONAL FIELDS
tags {
key = "My-tag_key"
value = "My tag value, value."
}
// OPTIONAL FIELDS
topic_description = "Platform events"
}
Create KafkaTopic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KafkaTopic(name: string, args: KafkaTopicArgs, opts?: CustomResourceOptions);@overload
def KafkaTopic(resource_name: str,
args: KafkaTopicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KafkaTopic(resource_name: str,
opts: Optional[ResourceOptions] = None,
partitions: Optional[int] = None,
project: Optional[str] = None,
replication: Optional[int] = None,
service_name: Optional[str] = None,
topic_name: Optional[str] = None,
config: Optional[KafkaTopicConfigArgs] = None,
owner_user_group_id: Optional[str] = None,
tags: Optional[Sequence[KafkaTopicTagArgs]] = None,
termination_protection: Optional[bool] = None,
timeouts: Optional[KafkaTopicTimeoutsArgs] = None,
topic_description: Optional[str] = None)func NewKafkaTopic(ctx *Context, name string, args KafkaTopicArgs, opts ...ResourceOption) (*KafkaTopic, error)public KafkaTopic(string name, KafkaTopicArgs args, CustomResourceOptions? opts = null)
public KafkaTopic(String name, KafkaTopicArgs args)
public KafkaTopic(String name, KafkaTopicArgs args, CustomResourceOptions options)
type: aiven:KafkaTopic
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aiven_kafka_topic" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args KafkaTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KafkaTopicArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KafkaTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KafkaTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KafkaTopicArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var kafkaTopicResource = new Aiven.KafkaTopic("kafkaTopicResource", new()
{
Partitions = 0,
Project = "string",
Replication = 0,
ServiceName = "string",
TopicName = "string",
Config = new Aiven.Inputs.KafkaTopicConfigArgs
{
CleanupPolicy = "string",
CompressionType = "string",
DeleteRetentionMs = "string",
DisklessEnable = false,
FileDeleteDelayMs = "string",
FlushMessages = "string",
FlushMs = "string",
IndexIntervalBytes = "string",
LocalRetentionBytes = "string",
LocalRetentionMs = "string",
MaxCompactionLagMs = "string",
MaxMessageBytes = "string",
MessageDownconversionEnable = false,
MessageFormatVersion = "string",
MessageTimestampAfterMaxMs = "string",
MessageTimestampBeforeMaxMs = "string",
MessageTimestampDifferenceMaxMs = "string",
MessageTimestampType = "string",
MinCleanableDirtyRatio = 0,
MinCompactionLagMs = "string",
MinInsyncReplicas = "string",
Preallocate = false,
RemoteStorageEnable = false,
RetentionBytes = "string",
RetentionMs = "string",
SegmentBytes = "string",
SegmentIndexBytes = "string",
SegmentJitterMs = "string",
SegmentMs = "string",
UncleanLeaderElectionEnable = false,
},
OwnerUserGroupId = "string",
Tags = new[]
{
new Aiven.Inputs.KafkaTopicTagArgs
{
Key = "string",
Value = "string",
},
},
Timeouts = new Aiven.Inputs.KafkaTopicTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
TopicDescription = "string",
});
example, err := aiven.NewKafkaTopic(ctx, "kafkaTopicResource", &aiven.KafkaTopicArgs{
Partitions: pulumi.Int(0),
Project: pulumi.String("string"),
Replication: pulumi.Int(0),
ServiceName: pulumi.String("string"),
TopicName: pulumi.String("string"),
Config: &aiven.KafkaTopicConfigArgs{
CleanupPolicy: pulumi.String("string"),
CompressionType: pulumi.String("string"),
DeleteRetentionMs: pulumi.String("string"),
DisklessEnable: pulumi.Bool(false),
FileDeleteDelayMs: pulumi.String("string"),
FlushMessages: pulumi.String("string"),
FlushMs: pulumi.String("string"),
IndexIntervalBytes: pulumi.String("string"),
LocalRetentionBytes: pulumi.String("string"),
LocalRetentionMs: pulumi.String("string"),
MaxCompactionLagMs: pulumi.String("string"),
MaxMessageBytes: pulumi.String("string"),
MessageDownconversionEnable: pulumi.Bool(false),
MessageFormatVersion: pulumi.String("string"),
MessageTimestampAfterMaxMs: pulumi.String("string"),
MessageTimestampBeforeMaxMs: pulumi.String("string"),
MessageTimestampDifferenceMaxMs: pulumi.String("string"),
MessageTimestampType: pulumi.String("string"),
MinCleanableDirtyRatio: pulumi.Float64(0),
MinCompactionLagMs: pulumi.String("string"),
MinInsyncReplicas: pulumi.String("string"),
Preallocate: pulumi.Bool(false),
RemoteStorageEnable: pulumi.Bool(false),
RetentionBytes: pulumi.String("string"),
RetentionMs: pulumi.String("string"),
SegmentBytes: pulumi.String("string"),
SegmentIndexBytes: pulumi.String("string"),
SegmentJitterMs: pulumi.String("string"),
SegmentMs: pulumi.String("string"),
UncleanLeaderElectionEnable: pulumi.Bool(false),
},
OwnerUserGroupId: pulumi.String("string"),
Tags: aiven.KafkaTopicTagArray{
&aiven.KafkaTopicTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Timeouts: &aiven.KafkaTopicTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
TopicDescription: pulumi.String("string"),
})
resource "aiven_kafka_topic" "kafkaTopicResource" {
lifecycle {
create_before_destroy = true
}
partitions = 0
project = "string"
replication = 0
service_name = "string"
topic_name = "string"
config = {
cleanup_policy = "string"
compression_type = "string"
delete_retention_ms = "string"
diskless_enable = false
file_delete_delay_ms = "string"
flush_messages = "string"
flush_ms = "string"
index_interval_bytes = "string"
local_retention_bytes = "string"
local_retention_ms = "string"
max_compaction_lag_ms = "string"
max_message_bytes = "string"
message_downconversion_enable = false
message_format_version = "string"
message_timestamp_after_max_ms = "string"
message_timestamp_before_max_ms = "string"
message_timestamp_difference_max_ms = "string"
message_timestamp_type = "string"
min_cleanable_dirty_ratio = 0
min_compaction_lag_ms = "string"
min_insync_replicas = "string"
preallocate = false
remote_storage_enable = false
retention_bytes = "string"
retention_ms = "string"
segment_bytes = "string"
segment_index_bytes = "string"
segment_jitter_ms = "string"
segment_ms = "string"
unclean_leader_election_enable = false
}
owner_user_group_id = "string"
tags {
key = "string"
value = "string"
}
timeouts = {
create = "string"
delete = "string"
read = "string"
update = "string"
}
topic_description = "string"
}
var kafkaTopicResource = new KafkaTopic("kafkaTopicResource", KafkaTopicArgs.builder()
.partitions(0)
.project("string")
.replication(0)
.serviceName("string")
.topicName("string")
.config(KafkaTopicConfigArgs.builder()
.cleanupPolicy("string")
.compressionType("string")
.deleteRetentionMs("string")
.disklessEnable(false)
.fileDeleteDelayMs("string")
.flushMessages("string")
.flushMs("string")
.indexIntervalBytes("string")
.localRetentionBytes("string")
.localRetentionMs("string")
.maxCompactionLagMs("string")
.maxMessageBytes("string")
.messageDownconversionEnable(false)
.messageFormatVersion("string")
.messageTimestampAfterMaxMs("string")
.messageTimestampBeforeMaxMs("string")
.messageTimestampDifferenceMaxMs("string")
.messageTimestampType("string")
.minCleanableDirtyRatio(0.0)
.minCompactionLagMs("string")
.minInsyncReplicas("string")
.preallocate(false)
.remoteStorageEnable(false)
.retentionBytes("string")
.retentionMs("string")
.segmentBytes("string")
.segmentIndexBytes("string")
.segmentJitterMs("string")
.segmentMs("string")
.uncleanLeaderElectionEnable(false)
.build())
.ownerUserGroupId("string")
.tags(KafkaTopicTagArgs.builder()
.key("string")
.value("string")
.build())
.timeouts(KafkaTopicTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.topicDescription("string")
.build());
kafka_topic_resource = aiven.KafkaTopic("kafkaTopicResource",
partitions=0,
project="string",
replication=0,
service_name="string",
topic_name="string",
config={
"cleanup_policy": "string",
"compression_type": "string",
"delete_retention_ms": "string",
"diskless_enable": False,
"file_delete_delay_ms": "string",
"flush_messages": "string",
"flush_ms": "string",
"index_interval_bytes": "string",
"local_retention_bytes": "string",
"local_retention_ms": "string",
"max_compaction_lag_ms": "string",
"max_message_bytes": "string",
"message_downconversion_enable": False,
"message_format_version": "string",
"message_timestamp_after_max_ms": "string",
"message_timestamp_before_max_ms": "string",
"message_timestamp_difference_max_ms": "string",
"message_timestamp_type": "string",
"min_cleanable_dirty_ratio": float(0),
"min_compaction_lag_ms": "string",
"min_insync_replicas": "string",
"preallocate": False,
"remote_storage_enable": False,
"retention_bytes": "string",
"retention_ms": "string",
"segment_bytes": "string",
"segment_index_bytes": "string",
"segment_jitter_ms": "string",
"segment_ms": "string",
"unclean_leader_election_enable": False,
},
owner_user_group_id="string",
tags=[{
"key": "string",
"value": "string",
}],
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
},
topic_description="string")
const kafkaTopicResource = new aiven.KafkaTopic("kafkaTopicResource", {
partitions: 0,
project: "string",
replication: 0,
serviceName: "string",
topicName: "string",
config: {
cleanupPolicy: "string",
compressionType: "string",
deleteRetentionMs: "string",
disklessEnable: false,
fileDeleteDelayMs: "string",
flushMessages: "string",
flushMs: "string",
indexIntervalBytes: "string",
localRetentionBytes: "string",
localRetentionMs: "string",
maxCompactionLagMs: "string",
maxMessageBytes: "string",
messageDownconversionEnable: false,
messageFormatVersion: "string",
messageTimestampAfterMaxMs: "string",
messageTimestampBeforeMaxMs: "string",
messageTimestampDifferenceMaxMs: "string",
messageTimestampType: "string",
minCleanableDirtyRatio: 0,
minCompactionLagMs: "string",
minInsyncReplicas: "string",
preallocate: false,
remoteStorageEnable: false,
retentionBytes: "string",
retentionMs: "string",
segmentBytes: "string",
segmentIndexBytes: "string",
segmentJitterMs: "string",
segmentMs: "string",
uncleanLeaderElectionEnable: false,
},
ownerUserGroupId: "string",
tags: [{
key: "string",
value: "string",
}],
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
topicDescription: "string",
});
type: aiven:KafkaTopic
properties:
config:
cleanupPolicy: string
compressionType: string
deleteRetentionMs: string
disklessEnable: false
fileDeleteDelayMs: string
flushMessages: string
flushMs: string
indexIntervalBytes: string
localRetentionBytes: string
localRetentionMs: string
maxCompactionLagMs: string
maxMessageBytes: string
messageDownconversionEnable: false
messageFormatVersion: string
messageTimestampAfterMaxMs: string
messageTimestampBeforeMaxMs: string
messageTimestampDifferenceMaxMs: string
messageTimestampType: string
minCleanableDirtyRatio: 0
minCompactionLagMs: string
minInsyncReplicas: string
preallocate: false
remoteStorageEnable: false
retentionBytes: string
retentionMs: string
segmentBytes: string
segmentIndexBytes: string
segmentJitterMs: string
segmentMs: string
uncleanLeaderElectionEnable: false
ownerUserGroupId: string
partitions: 0
project: string
replication: 0
serviceName: string
tags:
- key: string
value: string
timeouts:
create: string
delete: string
read: string
update: string
topicDescription: string
topicName: string
KafkaTopic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KafkaTopic resource accepts the following input properties:
- Partitions int
- Number of partitions. Value must be between
1and1000000. - Project string
- Project name. Changing this property forces recreation of the resource.
- Replication int
- Number of replicas. Minimum value:
1. - Service
Name string - Service name. Changing this property forces recreation of the resource.
- Topic
Name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - Config
Kafka
Topic Config - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- Owner
User stringGroup Id - The user group that owns this topic. Length must be between
1and36. -
List<Kafka
Topic Tag> - Topic tags.
- Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - Timeouts
Kafka
Topic Timeouts - Topic
Description string - Topic description. Length must be between
1and256.
- Partitions int
- Number of partitions. Value must be between
1and1000000. - Project string
- Project name. Changing this property forces recreation of the resource.
- Replication int
- Number of replicas. Minimum value:
1. - Service
Name string - Service name. Changing this property forces recreation of the resource.
- Topic
Name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - Config
Kafka
Topic Config Args - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- Owner
User stringGroup Id - The user group that owns this topic. Length must be between
1and36. -
[]Kafka
Topic Tag Args - Topic tags.
- Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - Timeouts
Kafka
Topic Timeouts Args - Topic
Description string - Topic description. Length must be between
1and256.
- partitions number
- Number of partitions. Value must be between
1and1000000. - project string
- Project name. Changing this property forces recreation of the resource.
- replication number
- Number of replicas. Minimum value:
1. - service_
name string - Service name. Changing this property forces recreation of the resource.
- topic_
name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - config object
- Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner_
user_ stringgroup_ id - The user group that owns this topic. Length must be between
1and36. - list(object)
- Topic tags.
- termination_
protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts object
- topic_
description string - Topic description. Length must be between
1and256.
- partitions Integer
- Number of partitions. Value must be between
1and1000000. - project String
- Project name. Changing this property forces recreation of the resource.
- replication Integer
- Number of replicas. Minimum value:
1. - service
Name String - Service name. Changing this property forces recreation of the resource.
- topic
Name String - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - config
Kafka
Topic Config - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner
User StringGroup Id - The user group that owns this topic. Length must be between
1and36. -
List<Kafka
Topic Tag> - Topic tags.
- termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts
Kafka
Topic Timeouts - topic
Description String - Topic description. Length must be between
1and256.
- partitions number
- Number of partitions. Value must be between
1and1000000. - project string
- Project name. Changing this property forces recreation of the resource.
- replication number
- Number of replicas. Minimum value:
1. - service
Name string - Service name. Changing this property forces recreation of the resource.
- topic
Name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - config
Kafka
Topic Config - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner
User stringGroup Id - The user group that owns this topic. Length must be between
1and36. -
Kafka
Topic Tag[] - Topic tags.
- termination
Protection boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts
Kafka
Topic Timeouts - topic
Description string - Topic description. Length must be between
1and256.
- partitions int
- Number of partitions. Value must be between
1and1000000. - project str
- Project name. Changing this property forces recreation of the resource.
- replication int
- Number of replicas. Minimum value:
1. - service_
name str - Service name. Changing this property forces recreation of the resource.
- topic_
name str - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - config
Kafka
Topic Config Args - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner_
user_ strgroup_ id - The user group that owns this topic. Length must be between
1and36. -
Sequence[Kafka
Topic Tag Args] - Topic tags.
- termination_
protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts
Kafka
Topic Timeouts Args - topic_
description str - Topic description. Length must be between
1and256.
- partitions Number
- Number of partitions. Value must be between
1and1000000. - project String
- Project name. Changing this property forces recreation of the resource.
- replication Number
- Number of replicas. Minimum value:
1. - service
Name String - Service name. Changing this property forces recreation of the resource.
- topic
Name String - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource. - config Property Map
- Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner
User StringGroup Id - The user group that owns this topic. Length must be between
1and36. - List<Property Map>
- Topic tags.
- termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts Property Map
- topic
Description String - Topic description. Length must be between
1and256.
Outputs
All input properties are implicitly available as output properties. Additionally, the KafkaTopic resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing KafkaTopic Resource
Get an existing KafkaTopic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KafkaTopicState, opts?: CustomResourceOptions): KafkaTopic@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config: Optional[KafkaTopicConfigArgs] = None,
owner_user_group_id: Optional[str] = None,
partitions: Optional[int] = None,
project: Optional[str] = None,
replication: Optional[int] = None,
service_name: Optional[str] = None,
tags: Optional[Sequence[KafkaTopicTagArgs]] = None,
termination_protection: Optional[bool] = None,
timeouts: Optional[KafkaTopicTimeoutsArgs] = None,
topic_description: Optional[str] = None,
topic_name: Optional[str] = None) -> KafkaTopicfunc GetKafkaTopic(ctx *Context, name string, id IDInput, state *KafkaTopicState, opts ...ResourceOption) (*KafkaTopic, error)public static KafkaTopic Get(string name, Input<string> id, KafkaTopicState? state, CustomResourceOptions? opts = null)public static KafkaTopic get(String name, Output<String> id, KafkaTopicState state, CustomResourceOptions options)resources: _: type: aiven:KafkaTopic get: id: ${id}import {
to = aiven_kafka_topic.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Config
Kafka
Topic Config - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- Owner
User stringGroup Id - The user group that owns this topic. Length must be between
1and36. - Partitions int
- Number of partitions. Value must be between
1and1000000. - Project string
- Project name. Changing this property forces recreation of the resource.
- Replication int
- Number of replicas. Minimum value:
1. - Service
Name string - Service name. Changing this property forces recreation of the resource.
-
List<Kafka
Topic Tag> - Topic tags.
- Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - Timeouts
Kafka
Topic Timeouts - Topic
Description string - Topic description. Length must be between
1and256. - Topic
Name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
- Config
Kafka
Topic Config Args - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- Owner
User stringGroup Id - The user group that owns this topic. Length must be between
1and36. - Partitions int
- Number of partitions. Value must be between
1and1000000. - Project string
- Project name. Changing this property forces recreation of the resource.
- Replication int
- Number of replicas. Minimum value:
1. - Service
Name string - Service name. Changing this property forces recreation of the resource.
-
[]Kafka
Topic Tag Args - Topic tags.
- Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - Timeouts
Kafka
Topic Timeouts Args - Topic
Description string - Topic description. Length must be between
1and256. - Topic
Name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
- config object
- Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner_
user_ stringgroup_ id - The user group that owns this topic. Length must be between
1and36. - partitions number
- Number of partitions. Value must be between
1and1000000. - project string
- Project name. Changing this property forces recreation of the resource.
- replication number
- Number of replicas. Minimum value:
1. - service_
name string - Service name. Changing this property forces recreation of the resource.
- list(object)
- Topic tags.
- termination_
protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts object
- topic_
description string - Topic description. Length must be between
1and256. - topic_
name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
- config
Kafka
Topic Config - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner
User StringGroup Id - The user group that owns this topic. Length must be between
1and36. - partitions Integer
- Number of partitions. Value must be between
1and1000000. - project String
- Project name. Changing this property forces recreation of the resource.
- replication Integer
- Number of replicas. Minimum value:
1. - service
Name String - Service name. Changing this property forces recreation of the resource.
-
List<Kafka
Topic Tag> - Topic tags.
- termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts
Kafka
Topic Timeouts - topic
Description String - Topic description. Length must be between
1and256. - topic
Name String - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
- config
Kafka
Topic Config - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner
User stringGroup Id - The user group that owns this topic. Length must be between
1and36. - partitions number
- Number of partitions. Value must be between
1and1000000. - project string
- Project name. Changing this property forces recreation of the resource.
- replication number
- Number of replicas. Minimum value:
1. - service
Name string - Service name. Changing this property forces recreation of the resource.
-
Kafka
Topic Tag[] - Topic tags.
- termination
Protection boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts
Kafka
Topic Timeouts - topic
Description string - Topic description. Length must be between
1and256. - topic
Name string - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
- config
Kafka
Topic Config Args - Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner_
user_ strgroup_ id - The user group that owns this topic. Length must be between
1and36. - partitions int
- Number of partitions. Value must be between
1and1000000. - project str
- Project name. Changing this property forces recreation of the resource.
- replication int
- Number of replicas. Minimum value:
1. - service_
name str - Service name. Changing this property forces recreation of the resource.
-
Sequence[Kafka
Topic Tag Args] - Topic tags.
- termination_
protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts
Kafka
Topic Timeouts Args - topic_
description str - Topic description. Length must be between
1and256. - topic_
name str - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
- config Property Map
- Advanced parameters to configure topics. Removing the block won't reset the topic configuration to default values. Instead, the topic will retain its last known configuration.
- owner
User StringGroup Id - The user group that owns this topic. Length must be between
1and36. - partitions Number
- Number of partitions. Value must be between
1and1000000. - project String
- Project name. Changing this property forces recreation of the resource.
- replication Number
- Number of replicas. Minimum value:
1. - service
Name String - Service name. Changing this property forces recreation of the resource.
- List<Property Map>
- Topic tags.
- termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, usepreventDestroy - timeouts Property Map
- topic
Description String - Topic description. Length must be between
1and256. - topic
Name String - Kafka topic name. Length must be between
1and249. Changing this property forces recreation of the resource.
Supporting Types
KafkaTopicConfig, KafkaTopicConfigArgs
- Cleanup
Policy string - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - Compression
Type string - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - Delete
Retention stringMs - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- Diskless
Enable bool - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- File
Delete stringDelay Ms - The time to wait before deleting a file from the filesystem.
- Flush
Messages string - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- Flush
Ms string - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- Index
Interval stringBytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- Local
Retention stringBytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - Local
Retention stringMs - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - Max
Compaction stringLag Ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- Max
Message stringBytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- Message
Downconversion boolEnable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- Message
Format stringVersion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - Message
Timestamp stringAfter Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- Message
Timestamp stringBefore Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- Message
Timestamp stringDifference Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- Message
Timestamp stringType - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - Min
Cleanable doubleDirty Ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - Min
Compaction stringLag Ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- Min
Insync stringReplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - Preallocate bool
- True if we should preallocate the file on disk when creating a new log segment.
- Remote
Storage boolEnable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- Retention
Bytes string - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- Retention
Ms string - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- Segment
Bytes string - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - Segment
Index stringBytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- Segment
Jitter stringMs - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- Segment
Ms string - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - Unclean
Leader boolElection Enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
- Cleanup
Policy string - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - Compression
Type string - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - Delete
Retention stringMs - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- Diskless
Enable bool - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- File
Delete stringDelay Ms - The time to wait before deleting a file from the filesystem.
- Flush
Messages string - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- Flush
Ms string - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- Index
Interval stringBytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- Local
Retention stringBytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - Local
Retention stringMs - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - Max
Compaction stringLag Ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- Max
Message stringBytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- Message
Downconversion boolEnable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- Message
Format stringVersion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - Message
Timestamp stringAfter Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- Message
Timestamp stringBefore Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- Message
Timestamp stringDifference Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- Message
Timestamp stringType - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - Min
Cleanable float64Dirty Ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - Min
Compaction stringLag Ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- Min
Insync stringReplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - Preallocate bool
- True if we should preallocate the file on disk when creating a new log segment.
- Remote
Storage boolEnable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- Retention
Bytes string - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- Retention
Ms string - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- Segment
Bytes string - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - Segment
Index stringBytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- Segment
Jitter stringMs - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- Segment
Ms string - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - Unclean
Leader boolElection Enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
- cleanup_
policy string - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - compression_
type string - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - delete_
retention_ stringms - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- diskless_
enable bool - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- file_
delete_ stringdelay_ ms - The time to wait before deleting a file from the filesystem.
- flush_
messages string - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- flush_
ms string - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- index_
interval_ stringbytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- local_
retention_ stringbytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - local_
retention_ stringms - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - max_
compaction_ stringlag_ ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- max_
message_ stringbytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- message_
downconversion_ boolenable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- message_
format_ stringversion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - message_
timestamp_ stringafter_ max_ ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- message_
timestamp_ stringbefore_ max_ ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- message_
timestamp_ stringdifference_ max_ ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- message_
timestamp_ stringtype - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - min_
cleanable_ numberdirty_ ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - min_
compaction_ stringlag_ ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- min_
insync_ stringreplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - preallocate bool
- True if we should preallocate the file on disk when creating a new log segment.
- remote_
storage_ boolenable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- retention_
bytes string - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- retention_
ms string - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- segment_
bytes string - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - segment_
index_ stringbytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- segment_
jitter_ stringms - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- segment_
ms string - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - unclean_
leader_ boolelection_ enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
- cleanup
Policy String - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - compression
Type String - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - delete
Retention StringMs - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- diskless
Enable Boolean - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- file
Delete StringDelay Ms - The time to wait before deleting a file from the filesystem.
- flush
Messages String - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- flush
Ms String - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- index
Interval StringBytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- local
Retention StringBytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - local
Retention StringMs - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - max
Compaction StringLag Ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- max
Message StringBytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- message
Downconversion BooleanEnable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- message
Format StringVersion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - message
Timestamp StringAfter Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- message
Timestamp StringBefore Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- message
Timestamp StringDifference Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- message
Timestamp StringType - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - min
Cleanable DoubleDirty Ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - min
Compaction StringLag Ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- min
Insync StringReplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - preallocate Boolean
- True if we should preallocate the file on disk when creating a new log segment.
- remote
Storage BooleanEnable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- retention
Bytes String - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- retention
Ms String - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- segment
Bytes String - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - segment
Index StringBytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- segment
Jitter StringMs - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- segment
Ms String - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - unclean
Leader BooleanElection Enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
- cleanup
Policy string - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - compression
Type string - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - delete
Retention stringMs - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- diskless
Enable boolean - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- file
Delete stringDelay Ms - The time to wait before deleting a file from the filesystem.
- flush
Messages string - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- flush
Ms string - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- index
Interval stringBytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- local
Retention stringBytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - local
Retention stringMs - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - max
Compaction stringLag Ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- max
Message stringBytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- message
Downconversion booleanEnable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- message
Format stringVersion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - message
Timestamp stringAfter Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- message
Timestamp stringBefore Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- message
Timestamp stringDifference Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- message
Timestamp stringType - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - min
Cleanable numberDirty Ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - min
Compaction stringLag Ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- min
Insync stringReplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - preallocate boolean
- True if we should preallocate the file on disk when creating a new log segment.
- remote
Storage booleanEnable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- retention
Bytes string - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- retention
Ms string - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- segment
Bytes string - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - segment
Index stringBytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- segment
Jitter stringMs - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- segment
Ms string - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - unclean
Leader booleanElection Enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
- cleanup_
policy str - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - compression_
type str - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - delete_
retention_ strms - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- diskless_
enable bool - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- file_
delete_ strdelay_ ms - The time to wait before deleting a file from the filesystem.
- flush_
messages str - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- flush_
ms str - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- index_
interval_ strbytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- local_
retention_ strbytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - local_
retention_ strms - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - max_
compaction_ strlag_ ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- max_
message_ strbytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- message_
downconversion_ boolenable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- message_
format_ strversion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - message_
timestamp_ strafter_ max_ ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- message_
timestamp_ strbefore_ max_ ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- message_
timestamp_ strdifference_ max_ ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- message_
timestamp_ strtype - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - min_
cleanable_ floatdirty_ ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - min_
compaction_ strlag_ ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- min_
insync_ strreplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - preallocate bool
- True if we should preallocate the file on disk when creating a new log segment.
- remote_
storage_ boolenable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- retention_
bytes str - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- retention_
ms str - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- segment_
bytes str - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - segment_
index_ strbytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- segment_
jitter_ strms - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- segment_
ms str - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - unclean_
leader_ boolelection_ enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
- cleanup
Policy String - The retention policy to use on old segments. Possible values include 'delete', 'compact', or a comma-separated list of them. The default policy ('delete') will discard old segments when their retention time or size limit has been reached. The 'compact' setting will enable log compaction on the topic. The possible values are
compact,compact,deleteanddelete. - compression
Type String - Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. The possible values are
gzip,lz4,producer,snappy,uncompressedandzstd. - delete
Retention StringMs - The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan).
- diskless
Enable Boolean - Indicates whether diskless should be enabled. This is only available for BYOC services with Diskless feature enabled.
- file
Delete StringDelay Ms - The time to wait before deleting a file from the filesystem.
- flush
Messages String - This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- flush
Ms String - This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.
- index
Interval StringBytes - This setting controls how frequently Kafka adds an index entry to its offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.
- local
Retention StringBytes - This configuration controls the maximum bytes tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the limit is equal to overall retention time. If set to -1, no limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionBytes. - local
Retention StringMs - This configuration controls the maximum time tiered storage will retain segment files locally before it will discard old log segments to free up space. If set to -2, the time limit is equal to overall retention time. If set to -1, no time limit is applied but it's possible only if overall retention is also -1. The field is required with
retentionMs. - max
Compaction StringLag Ms - The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
- max
Message StringBytes - The largest record batch size allowed by Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that the they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.
- message
Downconversion BooleanEnable - This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. When set to false, broker will not perform down-conversion for consumers expecting an older message format. The broker responds with UNSUPPORTED_VERSION error for consume requests from such older clients. This configuration does not apply to any message format conversion that might be required for replication to followers.
- message
Format StringVersion - Specify the message format version the broker will use to append messages to the logs. The value should be a valid ApiVersion. Some examples are: 0.8.2, 0.9.0.0, 0.10.0, check ApiVersion for more details. By setting a particular message format version, the user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting this value incorrectly will cause consumers with older versions to break as they will receive messages with a format that they don't understand. Deprecated in Kafka 4.0+: this configuration is removed and any supplied value will be ignored; for services upgraded to 4.0+, the returned value may be 'None'. The possible values are
0.10.0,0.10.0-IV0,0.10.0-IV1,0.10.1,0.10.1-IV0,0.10.1-IV1,0.10.1-IV2,0.10.2,0.10.2-IV0,0.11.0,0.11.0-IV0,0.11.0-IV1,0.11.0-IV2,0.8.0,0.8.1,0.8.2,0.9.0,1.0,1.0-IV0,1.1,1.1-IV0,2.0,2.0-IV0,2.0-IV1,2.1,2.1-IV0,2.1-IV1,2.1-IV2,2.2,2.2-IV0,2.2-IV1,2.3,2.3-IV0,2.3-IV1,2.4,2.4-IV0,2.4-IV1,2.5,2.5-IV0,2.6,2.6-IV0,2.7,2.7-IV0,2.7-IV1,2.7-IV2,2.8,2.8-IV0,2.8-IV1,3.0,3.0-IV0,3.0-IV1,3.1,3.1-IV0,3.2,3.2-IV0,3.3,3.3-IV0,3.3-IV1,3.3-IV2,3.3-IV3,3.4,3.4-IV0,3.5,3.5-IV0,3.5-IV1,3.5-IV2,3.6,3.6-IV0,3.6-IV1,3.6-IV2,3.7,3.7-IV0,3.7-IV1,3.7-IV2,3.7-IV3,3.7-IV4,3.8,3.8-IV0,3.9,3.9-IV0,3.9-IV1,4.0,4.0-IV0,4.1,4.1-IV0,4.2and4.2-IV0. - message
Timestamp StringAfter Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps later than the broker's timestamp.
- message
Timestamp StringBefore Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. Applies only for messages with timestamps earlier than the broker's timestamp.
- message
Timestamp StringDifference Max Ms - The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message. If message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.
- message
Timestamp StringType - Define whether the timestamp in the message is message create time or log append time. The possible values are
CreateTimeandLogAppendTime. - min
Cleanable NumberDirty Ratio - This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period. Maximum value:
1. - min
Compaction StringLag Ms - The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
- min
Insync StringReplicas - When a producer sets acks to 'all' (or '-1'), this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of 'all'. This will ensure that the producer raises an exception if a majority of replicas do not receive a write. Minimum value:
1. - preallocate Boolean
- True if we should preallocate the file on disk when creating a new log segment.
- remote
Storage BooleanEnable - Indicates whether tiered storage should be enabled. This is only available for services with Tiered Storage feature enabled.
- retention
Bytes String - This configuration controls the maximum size a partition (which consists of log segments) can grow to before we will discard old log segments to free up space if we are using the 'delete' retention policy. 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.
- retention
Ms String - This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the 'delete' retention policy. This represents an SLA on how soon consumers must read their data. If set to -1, no time limit is applied.
- segment
Bytes String - This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 megabytes. Minimum value:
14. - segment
Index StringBytes - This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.
- segment
Jitter StringMs - The maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling.
- segment
Ms String - This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data. Setting this to a very low value has consequences, and the Aiven management plane ignores values less than 10 seconds. Minimum value:
1. - unclean
Leader BooleanElection Enable - Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
KafkaTopicTag, KafkaTopicTagArgs
KafkaTopicTimeouts, KafkaTopicTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default_ String
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default str
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default String
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
$ pulumi import aiven:index/kafkaTopic:KafkaTopic example PROJECT/SERVICE_NAME/TOPIC_NAME
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.
published on Friday, Jul 3, 2026 by Pulumi