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

Prerequisites

You must meet the following prerequisites:

Create a topic

Create a topic named MyTopic.

  1. In the top navigation bar of the MNS console, select a region, for example, China (Hangzhou).
  2. In the left-side navigation pane, select Topics. In the upper-right corner of the Topics page, click Create Topic.
  3. In the Create Topic dialog box that appears, specify the parameters and click OK.createtopic

Modify a topic

After you create MyTopic, you can modify the topic based on your needs.

  1. In the topic list of the Topics page, find MyTopic. In the Action column, click Configure.
  2. In the Configure dialog box that appears, modify the values of parameters and click OK.modify a topic

View topic information

After you create MyQueue, you can query the topic information.

  1. On the Topics page of the console, you can view key parameters of MyTopic.view topic information
  2. To view all parameters of MyTopic, click Configure in the Action column.
  3. In the upper-right corner of the Topics page, click Get Endpoint to view the Internet Endpoint and Intranet Endpoint of MNS in the selected region.

Query a topic list

You can specify a keyword to search for all topics whose names start with the keyword. The keyword is case-sensitive.

  1. In the left-side navigation pane, click Topics to view all topics. Topics are displayed by page.
  2. Enter a keyword such as MyTopic in the search bar next to Topic Name, and click Search. All topics that meet the specified search condition are displayed in the console.

Delete a topic

  1. On the Topics page of the console, find MyTopic. In the Action column, click Delete.
  2. In the Prompt dialog box that appears, read the prompt and click OK.delete a topic

Create a subscription

To receive messages from a topic, you must create a subscription. In this example, MySubscription is created.

  1. On the Topics page, find MyTopic. In the Action column, click Subscription List.
  2. In the upper-right corner of the section that appears, click Subscribe.create a subscription 1
  3. In the Subscribe dialog box that appears, specify the parameters based on your needs and click OK to create MySubscription.
    Push TypeThe specified push type must be included in the push types that you specify when publishing messages to the topic.create a subscription 2

Query the subscription list of a topic

  1. Find MyTopic on the Topics page. In the Action column, click Subscription List to view all subscriptions. Subscriptions are displayed by page.
  2. You can also specify a keyword to search for all subscriptions whose names start with the specified keyword. Enter a keyword such My in the search bar next to Subscription Name and click Search. All subscriptions that meet the specified search condition are displayed in the console.

Query subscription information

  1. You can view key parameters of MySubscription in the subscription list.
  2. To view all parameters of MySubscription, click Configuration in the Action column.

Modify a subscription

  1. Find MySubscription in the subscription list. In the Action column, click Configuration.
  2. In the Configuration dialog box that appears, modify the values of parameters and click OK.

Delete a subscription

  1. Find MySubscription in the subscription list. In the Action column, click Delete.
  2. In the dialog box that appears, click OK.

Publish a message

  1. On the Topics page, find MyTopic. In the Action column, click Publish Message.
  2. On the Publish Message page, enter a message, select a push type, enter a tag, and then click OK.

    The Push Type that you specify when publishing messages to a topic must include the push type that you specify for a subscription.

    publish a message