Updated on 2024-04-08 GMT+08:00

Creating a Topic

Scenario

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

Prerequisites

A RocketMQ instance has been purchased.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner to select a region.

    Select the region where your RocketMQ instance is located.

  3. Click and choose Application > Distributed Message Service for RocketMQ to open the console of DMS for RocketMQ.
  4. Click a RocketMQ instance to go to the instance details page.
  5. In the navigation pane, choose Topics.
  6. Click Create Topic.
  7. 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.

    Figure 1 Creating a topic

  8. Click OK.