All Products
Search
Document Center

ApsaraMQ for Kafka:Modify message configurations

Last Updated:Jul 19, 2024

You can change the message retention period, maximum message size, consumer offset retention period, and Secure Sockets Layer (SSL) certificate key size of an ApsaraMQ for Kafka instance based on your business requirements.

Configuration information

ApsaraMQ for Kafka allows you to change the message retention period, maximum message size, consumer offset retention period, and SSL certificate key size for an instance.

Note

The time required to modify the message configurations of an ApsaraMQ for Kafka instance varies based on the instance specification. For instances that use the alikafka.hr.30xlarge specification or lower or the alikafka.hw.30xlarge specification or lower, the upgrade requires approximately 30 minutes to complete. For instances that use the alikafka.hr.60xlarge or higher or the alikafka.hw.60xlarge or higher, the upgrade requires more than 1 hour to complete. In most cases, the upgrade time linearly increases with the instance specification.

Parameter

Description

Message Retention Period

The maximum period of time for which a message can be retained when the disk capacity is sufficient.

  • When the disk usage reaches 85%, the disk capacity is considered insufficient and the system deletes messages in the order in which they are stored to ensure service availability.

  • Valid values: 24 to 480. Default value: 72. Unit: hours.

Maximum Message Size

The maximum size of a message that can be sent and received in ApsaraMQ for Kafka.

  • You can specify a message size up to 10 MB for instances of Standard Edition and Professional Edition.

  • Before you change the maximum message size to a new value, make sure that the new value is the same as the maximum message size that you specified for message producers and message consumers in the instance.

Consumer Offset Retention Period

The maximum period of time for which a consumer offset can be retained. The retention period of a consumer offset starts from the point in time when the consumer offset is committed. After the retention period of a consumer offset expires, the system deletes the consumer offset. Each time a consumer offset is committed to a topic partition, the system resets the retention period and counts the minutes of the consumer offset retention period from 0 minutes. Default value: 10080. Unit: minutes. The default value is equal to seven days. Valid values: 1440 to 43200.

Note

If a live consumer thread exists in a group, the consumer offsets of the group are not deleted even if the value specified by the Consumer Offset Retention Period is exceeded. For more information, see Why are expired consumer offsets retained?

SSL Certificate Key Size (Bits)

The size of SSL certificate keys for the instance. Unit: bits. This parameter is displayed only if Internet access is enabled for the instance. You can change the value of this parameter from 1024 to 4096. We recommend that you do not change the value of this parameter from 4096 to 1024. Before you change the SSL certificate key size for an instance from 1,024 bits to 4,096 bits in the ApsaraMQ for Kafka console, update the SSL certificate on your client and restart the client. For more information, see Update the SSL certificate algorithm.

Procedure

  1. Log on to the ApsaraMQ for Kafka console. In the Resource Distribution section of the Overview page, select the region where the ApsaraMQ for Kafka instance that you want to manage resides.

  2. On the Instances page, click the name of the instance that you want to manage.

  3. In the Configuration Information section of the Instance Details page, click Edit next to Message Retention Duration, Maximum Message Size, Consumer Offset Retention Time, SSL Certificate Key Size (Bits), and Secondary Zone to modify the parameters.

  4. In the Risks of Configuration Modification dialog box, read and confirm the risks and click OK.

    修改配置风险

What to do next

View task execution records