The retention period of a message that is stored on the Message Queue for Apache Kafka broker expires, but the message is retained.
Note The Message Retention Period parameter specifies the maximum period that messages can be retained when the disk capacity is sufficient. Valid values: 24 to 480. Default value: 72. Unit: hours. 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.


  • The size of the message segment is smaller than 1 GB.
    Note To prevent storage fragmentation, messages are stored in the form of segments. By default, a segment has a maximum size of 1 GB. The system deletes segments to delete messages. If the size of a segment does not reach the maximum size allowed, the message involved is retained.
  • The disk capacity is sufficient. To be specific, the disk usage is lower than 75%. In addition, the scheduled time for Message Queue for Apache Kafka to delete expired messages does not arrive.
    Note If the disk usage of an instance is lower than 75%, Message Queue for Apache Kafka deletes expired messages on the instance at 04:00 every day.