ApsaraMQ for Kafka lets you adjust the message retention period, maximum message size, consumer offset retention period, and SSL certificate key size of an instance to match your workload requirements.
Prerequisites
Before you begin, make sure that:
Internet access is enabled for the instance (required only to modify the SSL certificate key size)
Configurable parameters
| Parameter | Description | Default | Valid range |
|---|---|---|---|
| Message Retention Period | Maximum duration that messages are retained when disk capacity is sufficient. When disk usage reaches 85%, the system deletes messages in chronological order to free up space. | 72 hours | 24-480 hours |
| Maximum Message Size | Maximum size of a single message that producers can send and consumers can receive. Standard Edition and Professional Edition instances support up to 10 MB. | N/A | Up to 10 MB |
| Consumer Offset Retention Period | Maximum duration that a committed consumer offset is retained. The retention countdown resets each time an offset is committed to a topic partition. | 10,080 minutes (7 days) | 1,440-43,200 minutes |
| SSL Certificate Key Size (Bits) | Key size for SSL certificates. Available only when Internet access is enabled for the instance. | N/A | 1,024 or 4,096 bits |
If a live consumer thread exists in a consumer group, consumer offsets for that group are not deleted even after the retention period expires. For details, see Why are expired consumer offsets retained?
Before you modify
Review the following impact and precaution information before you start a configuration change.
Upgrade duration
Modifying message configurations triggers an instance upgrade. The expected duration depends on the instance specification:
| Instance specification | Estimated duration |
|---|---|
| alikafka.hr.30xlarge or lower, alikafka.hw.30xlarge or lower | Approximately 30 minutes |
| alikafka.hr.60xlarge or higher, alikafka.hw.60xlarge or higher | More than 1 hour |
Upgrade time increases linearly with the instance specification.
Maximum message size
Before you change the maximum message size, make sure that the new value matches the maximum message size configured on your producers and consumers.
SSL certificate key size
We recommend that you do not change the SSL certificate key size from 4,096 bits to 1,024 bits.
Before you upgrade the SSL certificate key size from 1,024 bits to 4,096 bits, update the SSL certificate on your client and restart the client. For details, see Update the SSL certificate algorithm.
Modify message configurations in the console
Log on to the ApsaraMQ for Kafka console.
In the Resource Distribution section of the Overview page, select the region where your instance resides.
On the Instances page, click the name of the instance.
In the Configuration Information section of the Instance Details page, click Edit next to the parameter that you want to modify: Message Retention Duration, Maximum Message Size, Consumer Offset Retention Time, SSL Certificate Key Size (Bits), or Secondary Zone.
In the Risks of Configuration Modification dialog box, review the risks, and click OK.
Verify the modification
After you submit the change, the instance enters an upgrade state. To confirm the modification:
Return to the Instance Details page and verify that the parameter reflects the new value.
Check the task status. For details, see View task execution records.