Modifying Topic Aging Time
Aging time is a period that messages in the topic are retained for. Consumers must retrieve messages before this period ends. Otherwise, the messages will be deleted and can no longer be retrieved.
After creating a topic, you can change its aging time based on service requirements. Changing the aging time does not affect services. The default aging time is 72 hours.
You can change the aging time in either of the following ways:
- By editing the topic on the Topics tab page
- By changing the value of the log.retention.hours parameter on the Parameters tab page. For details, see Modifying Kafka Parameters.
The log.retention.hours parameter takes effect only for topics that have no aging time configured. If there is aging time configured for a topic, it overrides the log.retention.hours parameter. For example, if the aging time of Topic01 is set to 60 hours and log.retention.hours is set to 72 hours, the actual aging time of Topic01 is 60 hours.
Procedure
- Log in to the management console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Application > Distributed Message Service for Kafka to open the console of DMS for Kafka.
- Click the desired Kafka instance to view the instance details.
- Click the Topics tab.
- Modify the topic aging time using either of the following methods:
- Select one or more topics and click Edit Topic in the upper left corner.
- In the row containing the desired topic, click Edit.
- In the Edit Topic dialog box, enter the aging time and click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot