tencent cloud

Feedback

Topic Management

Last updated: 2024-05-14 16:41:55

    Overview

    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 guides you on how to use topics to categorize and manage messages in TDMQ for RocketMQ.

    Prerequisites

    You have created a corresponding namespace.

    Directions

    Creating Topic

    1. Log in to TDMQ RocketMQ Console, select the region, and then click the ID of the target cluster to enter the cluster's basic information page.
    2. Click the Topic tab at the top, select the namespace, and then click Create to enter the creating topic page.
    3. In the creating topic dialog, fill in the following information.
    
    Topic name: Fill in the name of the topic (cannot be modified after creation), with 3-64 characters, which only contain letters, digits, -, and _.
    Type: Select the message type, including normal, sequential messages, delayed messages, and transaction messages (For more information on message types, see Message Type).
    Partition count: Select the number of partitions, with a maximum support of 16 partitions. Using multiple partitions can enhance the production and consumption performance of a single topic but cannot guarantee orderliness.
    Description: Fill in the topic description
    4. Click Submit, and the created topic is visible in the topic list.

    Sending Test Message

    The TDMQ for RocketMQ console supports manual message sending; performing the corresponding operation in the console allows for messages to be sent to specified topics.
    1. In the topic list, click Sending Test Message in the operation column of the target topic.
    2. In the pop-up window, enter the message key, message tag, and message content, then click Submit.
    

    Viewing Topic Details

    You can enter the topic detail page to view details about the current topic.

    Subscribed Group

    1. In the topic list, click the Topic Name or the Topic Details in the Operation column to enter the topic details page.
    2. On the topic details page, you can view the groups that have subscribed to the topic, as well as subscription rules and other information.
    

    Topic Queue Details

    Note:
    Only exclusive clusters support viewing topic queue details.
    On the topic details page, you can view the queue situation distributed across various Broker nodes under the current topic.
    

    Querying Topic

    You can search by topic name in the search box at the top right corner of the topic list page. The TDMQ for RocketMQ performs fuzzy matching and displays the search results.

    Editing Topic

    1. In the topic list, find the topic you want to edit, and click Edit in the operation bar.
    2. In the pop-up dialog box, you can edit the parameters of the topic.
    3. Click Submit to complete the editing of the topic.

    Deleting Topic

    Batch Deletion: In the topic list, check all the topics you want to delete, click Batch Delete at the top left corner, and in the pop-up prompt box, click Delete to complete the deletion.
    Single Deletion: In the topic list, find the topic you want to delete, click Delete in the operation column, and in the pop-up prompt box, click Delete to complete the deletion.
    Note:
    After a topic is deleted, all unconsumed messages retained in it will be cleared; therefore, proceed with caution.
    When deleting a single topic or batch deleting topics, the console verifies the data of the current topic, as shown in the following figure.
    

    Metadata Import and Export

    Metadata Export

    You can directly export metadata from the top right corner of the topic list page by clicking the
    
    button. The metadata is exported in a .xlsx format table file.

    Metadata Import

    If you need to load the topic information from one cluster into another, after the metadata is exported, you can click the
    
    button at the top right corner of the topic list page to import the topic data into the specified namespace.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support