All Products
Search
Document Center

ApsaraMQ for Kafka:Message retention period for Kafka instances

最終更新日:Dec 26, 2025

The configuration method and granularity for the message retention period of a Kafka instance depend on its instance type and topic storage class.

Kafka instances are available in two major versions: V2 (provisioned instances) and V3 (Serverless instances):

  • V3 instances support setting the message retention period at the instance level (log.retention.hours) and the topic level (retention.ms).

  • For V2 instances, the Standard Edition supports only the instance-level message retention period. The Professional Edition supports both the instance-level and topic-level message retention periods for topics that use local storage.

A topic-level configuration for the retention period overrides a broker-level configuration.