All Products
Search
Document Center

ApsaraMQ for Kafka:Modify message configurations

Last Updated:Mar 11, 2026

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

ParameterDescriptionDefaultValid range
Message Retention PeriodMaximum 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 hours24-480 hours
Maximum Message SizeMaximum 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/AUp to 10 MB
Consumer Offset Retention PeriodMaximum 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/A1,024 or 4,096 bits
Note

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 specificationEstimated duration
alikafka.hr.30xlarge or lower, alikafka.hw.30xlarge or lowerApproximately 30 minutes
alikafka.hr.60xlarge or higher, alikafka.hw.60xlarge or higherMore 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

  1. Log on to the ApsaraMQ for Kafka console.

  2. In the Resource Distribution section of the Overview page, select the region where your instance resides.

  3. On the Instances page, click the name of the instance.

  4. 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.

  5. 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.

Related topics