Configuration properties for MSK Serverless clusters
Amazon MSK sets broker configuration properties for serverless clusters. You can't change these broker configuration property settings. However, you can set or modify the following topic-level configuration properties. All other topic-level configuration properties are not configurable.
Configuration property | Default | Editable | Maximum allowed value |
---|---|---|---|
cleanup.policy |
Delete | Yes, but only at topic creation time | |
Producer | Yes | ||
1048588 | Yes | 8388608 (8MiB) | |
message.timestamp.difference.max.ms |
long.max | Yes | |
CreateTime | Yes | ||
250 GiB | Yes | Unlimited; set it to -1 for unlimited retention | |
7 days | Yes | Unlimited; set it to -1 for unlimited retention |
To set or modify these topic-level configuration properties, you can use Apache Kafka command line tools. See 3.2 Topic-level Configs
When using the Apache Kafka command line tools with Amazon MSK Serverless, make sure you completed steps 1-4 in the To set up Apache Kafka client tools on the client machine section of the Amazon MSK Serverless Getting Started documentation. Additionally, you must include the --command-config client.properties
parameter in your commands.
For example, the following command can be used to modify the retention.bytes topic configuration property to set unlimited retention:
<path-to-your-kafka-client-installation>
/bin/kafka-configs.sh —bootstrap-server<bootstrap_server_string>
—command-config client.properties --entity-type topics --entity-name<topic_name>
--alter --add-config retention.bytes=-1
In this example, replace <bootstrap server string>
with the bootstrap server endpoint for your Amazon MSK Serverless cluster, and <topic_name>
with the name of the topic you want to modify.
The --command-config client.properties
parameter ensures that the Kafka command line tool uses the appropriate configuration settings to communicate with your Amazon MSK Serverless cluster.