Help Center/ Distributed Message Service for RocketMQ/ User Guide/ Managing Messages/ Changing RocketMQ Message Retention Period
Updated on 2026-01-07 GMT+08:00

Changing RocketMQ Message Retention Period

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.

Prerequisite

A RocketMQ instance has been purchased.

Changing RocketMQ Message Retention Period

  1. Log in to the RocketMQ console.
  2. Click a RocketMQ instance name to go to the instance overview page.
  3. Click next to Message Retention.

    Enter an integer in the range from 1 to 720.

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

Related Document

To modify message retention by calling an API, see Modifying RocketMQ Configurations.