All Products
Search
Document Center

ApsaraMQ for MQTT:Manage topics

最終更新日:Feb 02, 2024

Message Queuing Telemetry Transport (MQTT) is a messaging protocol that is based on the publish-subscribe (pub/sub) model. In MQTT, each message belongs to a topic. MQTT supports multiple levels of topics. A level 1 topic is a parent topic. Before you use ApsaraMQ for MQTT, you must create a parent topic in the ApsaraMQ for MQTT console.

Usage notes

  • Topics cannot be used across instances. For example, you cannot use the endpoint of Instance B to subscribe to a topic that is created on Instance A.

  • A topic name must be 3 to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_).

Create a topic

  1. Log on to the ApsaraMQ for MQTT console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar, select the region where the instance that you want to manage resides. On the Instances page, click the instance name to go to the Instance Details page.

  3. In the left-side navigation pane, click Topics. In the upper-left corner of the Topics page, click Create Topic.
  4. In the Create Topic panel, set the Name and Description parameters for the topic and click OK in the lower-left corner.

Delete a topic

Warning After a topic is deleted, the producers stop sending messages to the topic and the consumers stop consuming messages from the topic. The metadata and messages in the topic are deleted and cannot be restored. Therefore, exercise caution when you delete a topic.
  1. Go to the Topics page.
  2. In the topic list, find the topic that you want to delete. In the Actions column, choose More > Delete.
  3. In the dialog box that appears, click OK.

Update the description of a topic

  1. Go to the Topics page.
  2. In the topic list, find the topic that you want to update and click the topic name.
  3. In the Basic Information section of the Topic Details page, click Edit next to Description. Modify the description of the topic in the field and click OK.

Query the details of a topic

  1. Go to the Topics page.
  2. In the topic list, find the topic that you want to query. Click the topic name to go to the Topic Details page.

References