All Products
Search
Document Center

Message Service:Manage topics in the console

Last Updated:Sep 27, 2023

This article describes how to manage topics in the MNS console.

Prerequisites

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 dialog box, set 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.
    The Topic Details page appears.

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 and click Edit in the Actions column.

  5. In the Edit Parameters of Topic dialog box, modify the topic settings and click OK.

    On the Basic Information tab 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 search box of the Topics page, enter the prefix of the topic name, for example, test, and then click the search icon.

    All the topics whose names are prefixed by test appear on the 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. 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. Click Details in the Actions column.

  5. In the Endpoint section of the Topic Details page, view the endpoints of the topic. The network types of these endpoints include Internet Access and Internal Access.

    Note

    You can use HTTP or HTTPS 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. Choose More > CloudMonitor in the Actions column.

  5. In the CloudMonitor section of the Topic Details page, view the monitoring metrics of the topic.

    Topic monitoring metrics
    Note

    For more information, 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. 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 dialog box, set the following parameters and click OK.

    • Name: the name of the subscription.

    • Push Type: 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 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 Subscription 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. Click View Subscriptions in the Actions column.

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

  6. On the Manage Subscriptions page, find the subscription that you want to edit. Click Modify Retry Policy in the Actions column.

  7. In the Edit Parameter of Subscription dialog box, edit 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 and click View Subscription in the Actions column.

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

  6. In the search box of the Manage Subscriptions page, enter the prefix of the subscription name, for example, test, and then click the search icon.

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

    push

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 and click View Subscriptions in the Actions column.

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

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

  7. 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.