You can modify the maximum message retention period, maximum message size, and maximum retention period for consumer offsets based on business needs.

Prerequisites

A Message Queue for Apache Kafka instance is purchased and deployed, and it is in the Running state.

Procedure

  1. Log on to the Message Queue for Apache 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 that you want to manage.
  4. In the Configuration Information section of the Instance Details page, use one of the following methods to modify the maximum message retention period, maximum message size, and maximum retention period for consumer offsets:
    • Click Edit on the right side of Message Retention Period. In the Edit Configuration Information of Instance panel, modify the maximum message retention period in the Message Retention Period field, modify the maximum size of a message that can be sent or received in the Maximum Message Size field, modify the maximum retention period for consumer offsets of messages in the Consumer Offset Retention Period field, and then click OK. For more information about the valid values of these parameters, see Table 1.
    • Click Edit on the right side of Maximum Message Size. In the Edit Configuration Information of Instance panel, modify the maximum message retention period in the Message Retention Period field, modify the maximum size of a message that can be sent or received in the Maximum Message Size field, modify the maximum retention period for consumer offsets of messages in the Consumer Offset Retention Period field, and then click OK. For more information about the valid values of these parameters, see Table 1.
    • Click Edit on the right side of Consumer Offset Retention Period. In the Edit Configuration Information of Instance panel, modify the maximum message retention period in the Message Retention Period field, modify the maximum size of a message that can be sent or received in the Maximum Message Size field, modify the maximum retention period for consumer offsets of messages in the Consumer Offset Retention Period field, and then click OK. For more information about the valid values of these parameters, see Table 1.
    Table 1. Parameters
    Parameter Description
    Message Retention Period The maximum message retention period when the disk capacity is sufficient.
    • When the disk usage reaches 85%, the disk capacity is insufficient, and the system deletes messages from the earliest stored ones to ensure service availability.
    • Valid values: 24 to 480. Default value: 72. Unit: hours.
    Maximum Message Size The maximum size of a message that you can send from or receive in Message Queue for Apache Kafka .
    • The maximum message size is 10 MB for instances of the Standard Edition and the Professional Edition.
    • Before you modify the maximum message size, make sure that the new value matches the configurations on the producer and consumer.
    Consumer Offset Retention Period The maximum retention period for consumer offsets of messages. The retention period of a consumer offset starts from the point in time when the consumer offset is committed. After the retention period expires, the consumer offset is deleted. Each time a consumer offset is committed to a topic partition, the retention period is reset for recalculation. Valid values: 1440 to 43200. Default value: 10080. Unit: minutes. 10,080 minutes equal to seven days.
    Note If an active consumer thread exists in a group, the consumer offsets of the group are not deleted, 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 is an expired consumer offset retained?.
  5. In the Risks of Configuration Modification message, read the notes on the risks of modifying the configurations. If you are sure to modify the configurations, click OK.
    Risks of modifying the configurations

What to do next

View task execution records