MNS allows you to push messages to a specified HTTP server of a topic. This article describes how to push messages to an HTTP server.

Step 1: 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.

Step 2: 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. On the Manage Subscriptions page, click Create Subscription.
  6. In the Create Subscription dialog box, set the following parameters and click OK.
    • Name: Enter the name of the subscription.
    • Push Type: Select HTTP.
    • Receiver Endpoint: Enter the endpoint of the HTTP server.
      Note The endpoint of the HTTP server cannot be an internal IP address.
    • Optional:Message Filtering Tag: Enter a tag to filter messages.
    • Retry Policy: Select a retry policy.
    • Message Pushing Format: Select a format for pushed messages.

Step 3: Publish messages

  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: Enter the message content.
    • Optional:Message Tag: Enter a tag to filter messages.
    • Subscription Type: Select HTTP.