All Products
Search
Document Center

Message Service:Manage topics in the console

Last Updated:Apr 10, 2024

This topic describes how to manage topics in the Message Service (MNS) console.

Prerequisites

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

Create a topic

  1. Log on to the MNS 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, configure the following parameters and click OK.

    • Name: the name of the topic.

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

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

    After you create the topic, you are redirected to the Topic Details page of the topic.

Edit a topic

  1. Log on to the MNS console.

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

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

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

  5. In the Edit Parameter of Topic panel, modify the topic settings and click OK.

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

Search for topics

  1. Log on to the MNS console.

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

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

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

    All the topics whose names are prefixed with test are displayed on the Topics page.

View the details of a topic

  1. Log on to the MNS console.

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

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

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

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

View the endpoints of a topic

  1. Log on to the MNS console.

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

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

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

  5. In the Endpoint section of the Topic Details page, view the endpoints that are used to access the topic over the Internet and internal network.

    Note

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

View the monitoring metrics of a topic

  1. Log on to the MNS console.

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

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

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

  5. 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. Log on to the MNS console.

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

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

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

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

    The topic is deleted from the Topics page.

    Warning

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

Create a subscription

  1. Log on to the MNS console.

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

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

  4. On the Topics page, find the topic. Click View Subscriptions in the Actions column.

  5. In the View Subscriptions to Topic panel, click Subscriptions.

  6. On the Manage Subscriptions page, click Create Subscription.

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

    • Name: the name of the subscription.

    • Push Type: the type of the subscription. In this example, set the value to Queue.

      The Push Type parameter can be set to one of the following values:

    • 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 MNS topic to the receiver.

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

      • Backoff Retry

      • Exponential Decay Retry

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

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

      • SIMPLIFIED

      • JSON

      • XML

    The subscription appears on the Manage Subscriptions page.

Edit a subscription

  1. Log on to the MNS console.

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

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

  4. On the Topics page, find the topic that you want to manage and click the topic name.

  5. In the left-side navigation pane, click Manage Subscriptions. On the Manage Subscriptions page, find the subscription that you want to modify and click Modify Retry Policy in the Actions column.

  6. In the Edit Parameter of Subscription panel, modify the retry policy and click OK.

Search for subscriptions to a topic

  1. Log on to the MNS console.

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

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

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

  5. In the View Subscriptions to Topic panel, enter the prefix of the subscription name in the top search box, such as test, and click the search icon.

    All the subscriptions whose names are prefixed with test are displayed.

Delete a subscription

  1. Log on to the MNS console.

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

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

  4. On the Topics page, find the topic that you want to manage and click the topic name.

  5. In the left-side navigation pane, click Manage Subscriptions. On the Manage Subscriptions page, find the subscription that you want to delete and click Delete in the Actions column.

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

    The subscription is deleted from the Manage Subscriptions page.

Publish a message

  1. Log on to the MNS console.

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

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

  4. On the Topics page, find the topic to which you want to publish a message. Choose More > Publish Message in the Actions column.
  5. On the Try Publishing Message to Topic page, set the following parameters and click Publish Message.
    • Message Content: The body of the message to be published.
    • Optional:Message Tag: the tag used to filter messages.
    • Subscription Type: the subscription type of pushing a message to the topic.
    "The message is sent" appears on the page.