Updated on 2024-04-08 GMT+08:00

Changing Message Retention Period

Scenario

Message retention period is a period that messages in a topic are retained for. Consumers must retrieve messages before this period ends. Otherwise, the messages will be deleted and can no longer be retrieved.

The retention period of normal messages and dead letter messages is controlled by and changes with the message retention period.

After creating an instance, you can modify its message retention period based on service requirements. Changing the retention period does not restart the instance. The default message retention period is 48 hours.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner to select a region.

    Select the region where your RocketMQ instance is located.

  3. Click and choose Application > Distributed Message Service for RocketMQ to open the console of DMS for RocketMQ.
  4. Click a RocketMQ instance to go to the details page.
  5. Click next to Message Retention, enter a value in the range from 1 to 720, and click .

    The modification result is displayed in the upper right corner of the page.