All Products
Search
Document Center

ApsaraMQ for Kafka:Modify configurations for messages

Last Updated:Dec 11, 2023

You can change the configurations of an ApsaraMQ for Kafka instance based on your business requirements. You can change the retention period of messages, maximum size of a single message, retention period of consumer offsets, and length of SSL certificate keys for the instance.

Prerequisites

An ApsaraMQ for Kafka instance is purchased and deployed, and the instance is in the Running state.

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, modify the configurations. You can use one of the following methods to modify the configurations of the instance.

    • Click Edit next to the Message Retention Period field. In the Edit Configuration Information of Instance panel, you can change the values of the Message Retention Period, Maximum Message Size, and Consumer Offset Retention Period parameters, and set the value of the SSL Certificate Key Size (Bits) parameter to 4096. Then, click OK. For information about valid values for these parameters, see Parameters.

    • Click Edit next to the Maximum Message Size field. In the Edit Configuration Information of Instance panel, you can change the values of the Message Retention Period, Maximum Message Size, and Consumer Offset Retention Period parameters, and set the value of the SSL Certificate Key Size (Bits) parameter to 4096. Then, click OK. For information about valid values for these parameters, see Parameters.

    • Click Edit next to the Consumer Offset Retention Period field. In the Edit Configuration Information of Instance panel, you can change the values of the Message Retention Period, Maximum Message Size, and Consumer Offset Retention Period parameters, and set the value of the SSL Certificate Key Size (Bits) parameter to 4096. Then, click OK. For information about valid values for these parameters, see Parameters.

    • Click Edit next to the SSL Certificate Key Size (Bits) field. In the Edit Configuration Information of Instance panel, you can change the values of the Message Retention Period, Maximum Message Size, and Consumer Offset Retention Period parameters, and set the value of the SSL Certificate Key Size (Bits) parameter to 4096. Then, click OK. For information about valid values for these parameters, see Parameters.

    Table 1. Parameters

    Parameter

    Description

    Message Retention Period

    The maximum message retention period when the disk capacity is sufficient.

    • After the storage usage exceeds 85%, the system deletes messages in the order in which the messages are stored. The earliest message that is stored is the first message that is deleted. This helps ensure that the performance of the service is not degraded.

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

    Maximum Message Size

    The maximum size of a single message that the ApsaraMQ for Kafka instance can send and receive.

    • You can specify a message size of up to 10 MB for instances of the Standard Edition and the 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 retention period of consumer offsets. 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 an active consumer thread exists in a group, the system does not delete consumer offsets of the group, regardless of whether the retention period of the consumer offsets exceeds the specified value of the Consumer Offset Retention Period parameter. For more information, see Why are expired consumer offsets retained?.

    SSL Certificate Key Size (Bits)

    The length of SSL certificate keys for the instance. Unit: bits. This parameter is displayed only when the instance can be accessed over the Internet. 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 length of SSL certificate keys for an instance from 1,024 bits to 4,096 bits in the console, update the SSL certificate on your client and restart the client. For more information, see Update the SSL certificate algorithm.

  4. In the Risks of Configuration Modification message, read the description about potential risks that may be caused by modifying the configurations. To confirm the changes, click OK.

    Risks of modifying the configurations

What to do next

View task execution records