All Products
Search
Document Center

ApsaraMQ for Kafka:When are historical messages deleted from ApsaraMQ for Kafka?

更新時間:Mar 15, 2024

If a message that indicates the disk is full or the Queue full error appears when you write data to a topic in ApsaraMQ for Kafka, ApsaraMQ for Kafka implements a message cleanup policy based on the disk usage. This helps prevent broker failures that are caused by disk space insufficiency and improves service availability.

Cleanup policies

  • If the disk usage of an instance is lower than 75%, expired messages on the instance are deleted at 04:00 every day.

  • If the disk usage of an instance is equal to or higher than 75% but lower than 85%, expired messages on the instance are regularly deleted to lower the disk usage to a value less than 75%.

  • If the disk usage of an instance is equal to or higher than 85% but lower than 90%, the earliest stored messages on the ApsaraMQ for Kafka broker are deleted, regardless of whether their retention period expires.

  • If the disk usage of an instance is equal to or higher than 90%, no more messages can be sent to the instance. This ensures service availability.

    Important
    • To ensure service reliability and message backtracking capabilities, we recommend that you maintain the disk usage of an instance lower than or equal to 70%.

    • ApsaraMQ for Kafka dynamically clears messages. Manual message deletion is not required or supported.

    • You can choose Observability > Cloud Monitor in the left-side navigation pane of the Instance Details page to view the disk usage of an instance. For more information, see CloudMonitor.

    • The Total Messages on Current Broker parameter on the Topic Details page indicates the total number of unexpired messages that are sent to the topic. The value of this parameter cannot be used to determine whether the cleanup policy is to be performed.

References