Topic is a core concept in TDMQ for RocketMQ. It is usually used to categorize and manage various messages produced by the system in a centralized manner; for example, messages related to transactions can be placed in a topic named "trade" for other consumers to subscribe to.
In actual application scenarios, a topic often represents a business category. You can decide how to design different topics based on your system and data architectures.
This document describes how to use topics to categorize and manage messages in TDMQ for RocketMQ.
You have created a namespace.
- Log in to the TDMQ console, select the region, and click the ID of the target cluster to enter the cluster's basic information page.
- Click the Topic tab at the top, select a namespace, and click Create to enter the Create Topic page.
- In the Create Topic window, enter the following information:
- Topic Name: enter the topic name, which cannot be modified after creation and can contain 3–64 letters, digits, hyphens, and underscores.
- Type: select the message type, including general, globally sequential, and partitionally sequential. For more information on message types, see Message Type.
- Remarks: enter the topic remarks.
- Click Submit, and you can see the created topic in the topic list.
Viewing topic details
- In the topic list, click the number under Number of Subscribed Groups of the target topic.
- You will be redirected to the group list, which displays the information of the groups subscribed to the topic.
You can search for topics by topic name in the search box in the top-right corner of the Topic list page. TDMQ for RocketMQ will perform a fuzzy match and display the search results.
- In the topic list, click Edit in the Operation column of the target topic.
- In the pop-up window, you can edit the topic remarks.
- Click Submit.
After a topic is deleted, all unconsumed messages retained in it will be cleared; therefore, proceed with caution.
- In the topic list, click Delete in the Operation column of the target topic.
- In the pop-up window, click Submit.