All Products
Search
Document Center

Simple Message Queue (formerly MNS):Manage topics in the console

更新時間:Sep 02, 2024

This topic describes the operations that you can perform to manage topics in the Simple Message Queue (formerly MNS) console.

Prerequisites

SMQ is activated, and a Resource Access Management (RAM) user is authorized to access SMQ. For more information, see Activate SMQ and authorize RAM users to access SMQ.

Create a topic

  1. Log on to the SMQ console.

  2. In the left-side navigation pane, click Topics.

  3. In the top navigation bar, select a region.

  4. On the Topics page, click Create Topic.

  5. In the Create Topic panel, set the following parameters and click OK.

    • Name: the name of the topic.

    • Maximum Message Length: the maximum length of the message that is sent to the topic.

    • Enable Logging Feature: specifies whether to enable the logging feature.

    After the topic is created, the Topic Details page of the topic automatically appears.

Edit a topic

  1. On the Topics page, find the topic that you want to modify and click Edit in the Actions column.

  2. In the panel that appears, modify the parameters and click OK.

    In the Basic Information section of the Topic Details page, you can view the modified topic settings.

Search for topics

  1. In the search box of the Topics page, enter the prefix of a topic name, such as test, and click the search icon.

    All the topics whose names are prefixed by test appear on the page.

View the details of a topic

  1. On the Topics page, find the topic that you want to view and click Details in the Actions column.

  2. On the Topic Details page, view the details of the topic.

View the endpoints of a topic

  1. On the Topics page, find the topic that you want to view and click Details in the Actions column.

  2. In the Endpoint section of the Topic Details page, view the endpoints Internet Access and Internal Access.

    Note

    You can send HTTP or HTTPS requests to access the endpoints.

View the monitoring metrics of a topic

  1. On the Topics page, find the topic that you want to view and choose More > Cloud Monitor in the Actions column.

  2. In the Cloud Monitor section of the Topic Details page, view the monitoring metrics of the topic.

    主题监控

    Note

    For more information about alert rules, see Create an alert rule.

Delete a topic

  1. On the Topics page, find the topic that you want to delete and choose More > Delete in the Actions column.

  2. In the Note message, read the note and click OK.

    After the topic is deleted, it is not displayed on the Topics page.

    Warning

    After a topic is deleted, you cannot restore the data of the topic.

Create a subscription

  1. On the Topics page, find the topic that you want to manage and click View Subscriptions in the Actions column.

  2. In the panel that appears, click Subscriptions.

  3. On the Subscriptions page, click Create Subscription.

  4. In the Create Subscription panel, set the following parameters and click OK.

    • Name: the name of the subscription.

    • Subscription: the type of the subscription. The default value is Queue.

    • Receiver Endpoint: the endpoint of the receiver.

    • (Optional) Message Filtering Tag: the tag that is used to filter messages.

    • Retry Policy: the retry policy that is applied if an error occurs during message delivery from an SMQ topic to the receiver.

      The Retry Policy parameter can be set to one of the following values:

      • Backoff Retry

      • Exponential Decay Retry

    • Message Format: the format of the message that is pushed to the receiver.

      The Message Format parameter can be set to one of the following values:

      • SIMPLIFIED

      • JSON

      • XML

    After the subscription is created, it is displayed on the Subscriptions page.

Edit a subscription

  1. On the Topics page, find the topic that you want to manage and click View Subscriptions in the Actions column.

  2. In the panel that appears, click Subscriptions.

  3. On the Subscriptions page, find the subscription that you want to modify and click Modify Retry Policy in the Actions column.

  4. In the panel that appears, modify the retry policy and click OK.

Search for subscriptions to a topic

  1. On the Topics page, find the topic that you want to manage and click View Subscriptions in the Actions column.

  2. In the panel that appears, click Subscriptions.

  3. In the search box of the Subscriptions page, enter the prefix of the subscription name, such as test, and then click the search icon.

    All the subscriptions whose names are prefixed by test appear on the page.

Delete a subscription

  1. On the Topics page, find the topic that you want to manage and click View Subscriptions in the Actions column.

  2. In the panel that appears, click Subscriptions.

  3. On the Subscriptions page, find the subscription that you want to delete. Click Actions in the Delete column.

  4. In the Note message, read the note and click OK.

    After the subscription is deleted, it is not displayed on the Subscriptions page.

Publish a message

  1. On the Topics page, find the topic that you want to manage and click Publish Message in the Actions column.

  2. On the Publish Message page, set the following parameters and click Publish Message.

    • Message Content: the body of the message to be published.

    • Message Tag: the tag that is used to filter messages. This parameter is optional.

    • Subscription Type: the subscription type of the message that you want to push to the topic. In this example, messages are pushed to a queue.

    The "The message is sent" message appears on the page.