Updated on 2024-05-10 GMT+08:00

Step 3: Create a Topic

A topic is the basic unit for sending and receiving messages. After creating a RocketMQ instance, you must manually create topics before creating and retrieving messages.

Prerequisites

You have created a RocketMQ instance.

Procedure

  1. Log in to the DMS for RocketMQ consoleconsole.
  2. Click a RocketMQ instance to go to the instance details page.
  3. In the navigation pane, choose Topics.
  4. Click Create Topic.
  5. Configure the topic name and other parameters by referring to Table 1.

    Table 1 Topic parameters

    Parameter

    Description

    Topic Name

    Name of the topic.

    The topic name must be unique. Otherwise, the topic cannot be created.

    Once the topic is created, you cannot modify its name.

    NOTE:

    A percent (%) or vertical bar (|) contained in a topic name will be converted to an underscore (_) by Cloud Eye. For example, if a topic name is test%01, it will be displayed as test_01 on Cloud Eye.

    Permission

    Topic permission, which can be publish/subscribe, publish, or subscribe.

    Brokers

    Specify the broker to create the topic on, and the number of queues in the topic.

    If the instance is deployed on multiple brokers, click Add to add more brokers and set the number of queues in the topic.

  6. Click OK.