All Products
Search
Document Center

Simple Message Queue (formerly MNS):HTTP

Last Updated:Nov 06, 2024

Simple Message Queue (SMQ, formerly MNS) supports pushing messages published to a topic to an HTTP server. This topic describes how to push messages to an HTTP server.

Step 1: Create a topic

  1. Log on to the SMQ console.

  2. In the left-side navigation pane, choose Topic Model > 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 then click OK.

    • Name: the name of the topic.

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

    • Enable Logging Feature: whether to enable the log management feature.

    The Topic Details page of the target topic appears.

Step 2: Create a subscription

  1. In the left-side navigation pane, choose Topic Model > Subscriptions.

  2. On the Subscriptions page, click Create Subscription.

  3. In the Create Subscription panel, configure the following parameters, and then click OK.

    • Topic Name: the name of the topic to which the subscription belongs.

    • Subscription Name: the subscription name.

    • Subscription: Select HTTP.

    • Endpoint: Enter the HTTP address.

      Note

      The HTTP receiver address does not currently support intranet IPs.

    • (Optional) Message Filtering Tag: Enter a tag to filter messages.

    • Retry Policy: the retry policy.

    • Message Format: Select the message push format.

      • SIMPLIFIED: The message body is the user-published message without any attribute information.

      • JSON: The message body is in JSON format, containing the message content and message attributes.

      • XML: The message body is in XML format, containing the message content and message attributes.

Step 3: Publish a message

  1. On the Topic List page, find the target topic, and click Publish Message in the Actions column on the right.

  2. On the Quick Experience To Publish Message To Subject page, configure the following parameters, and then click Publish Message.

    • Message Content: Enter the message body.

    • (Optional)Message Tag: Enter a tag to filter messages.

    • Subscription Type: Select HTTP.

References

For more information about verifying a signature for HTTP messages using the client SDKs, see Verify a signature on an HTTP server.