This article describes how to create, delete, update, and search for a topic in the Message Queue for Apache RocketMQ console.

Background information

A topic is a first-level identifier that is used to classify messages in Message Queue for Apache RocketMQ. Message Queue for Apache RocketMQ supports the Publish/Subscribe (Pub/Sub) messaging model. Producers send messages to topics. Consumers subscribe to topics to receive messages.

Usage notes

  • A topic cannot be used across instances. For example, Topic A created in Instance A is unavailable in Instance B.
  • Each topic name in an instance must be unique. Topics in different instances can share the same name.
  • The topic name can be 3 to 64 characters in length and can contain only letters, digits, hyphens (-), and underscores (_).
  • Message Queue for Apache RocketMQ charges you based on API calls and topic usage. Therefore, the costs change when you create or delete a topic. For more information about billing, see Billing overview.

Create a topic

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region, such as China (Hangzhou).
  4. On the Instances page, click the name of the instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Topics.
  6. On the Topics page, click Create Topic.
  7. In the Create Topic panel, set the Name, Description, and Message Type parameters and click OK.Create a topic
    On the Topics page, you can view the topic that you have created.
Notice Once specified, a topic can send or receive messages only of the specific type. For example, if you specify a topic to send or receive normal messages, the topic cannot send or receive ordered messages. For more information, see Message types.

Delete a topic

Notice After you delete a topic, related producers and consumers stop sending and receiving messages. The metadata and message data are also deleted and cannot be restored. Exercise caution when you perform this operation.
  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region, such as China (Hangzhou).
  4. On the Instances page, click the name of instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Topics.
  6. On the Topics page, find the topic that you want to delete, click More in the Actions column, and then select Delete from the drop-down list.
  7. In the message that appears, click OK.
    On the Topics page, you can no longer view the topic that you have deleted.

Update a topic

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region, such as China (Hangzhou).
  4. On the Instances page, click the name of instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Topics.
  6. On the Topics page, find the topic that you want to update and click Details in the Actions column. The Topic Details page appears.
  7. In the Basic Information section, click the Edit icon next to Topic Description. Modify the description of the topic in the field and click OK.Update a topic
    On the Topics page, you can view the new description of the topic.

Search for a topic

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region, such as China (Hangzhou).
  4. On the Instances page, click the name of the instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Topics.
  6. On the Topics page, find the topic that you want to view and click the topic name or click Details in the Actions column. The Topic Details page appears.
    On the Topic Details page, you can query details of the topic.

Perform other operations

On the Topics page, you can perform other related operations.

On the Topics page, find the topic that you want to manage, click More in the Actions column, and then select one of the following options from the drop-down list:
  • Quick Start: Send and receive messages in the console.
  • Permissions Reference: View the permission policies for topic management in the Message Queue for Apache RocketMQ console. For more information, see Policies and examples.
  • Online Groups: View the online groups that subscribe to the topic.
  • Cloud Monitor: View the monitoring data of message production or consumption in the topic.
  • Message Production Chart: View the total number of produced messages in the topic. You can also view the transactions per second (TPS) of message production.
  • Message Consumption Chart: View the total number of messages that the topic sends to its online groups. You can also view the TPS of message delivery.
  • Query Messages: Create a query task to query the details of the topic. For more information, see Query messages.

References

You can call the following API operations to manage topics: