Updated on 2023-03-01 GMT+08:00

Adding a Subscription to a Topic

Scenarios

To deliver messages published to a topic to endpoints, you must add the subscription endpoints to the topic.

To Add a Subscription

  1. and select Simple Message Notification under Application Service.

    The SMN console is displayed.

  2. In the navigation pane, choose Topic Management > Topics.

    The Topics page is displayed.

  3. Locate the topic that you want to add a subscription to. In the Operation column, click Add Subscription.

    The Add Subscription dialog box is displayed.

  4. Specify the subscription protocol and endpoints.
    You can enter up to 10 endpoints, each on a separate line.
    • Email

      Enter a valid email address, for example, username@example.com.

      Subscribers will receive a subscription confirmation email valid in 48 hours and must confirm the subscription to receive messages published to the topic.

    • HTTP or HTTPS

      Enter a public network URL, for example, http://example.com/notification/action. HTTP/HTTPS subscribers must confirm their subscriptions. For details about HTTP/HTTPS messages, see Introduction.

    • SMS

      Enter a valid mobile number, for example, 18512345678.

      Subscribers will receive a subscription confirmation message valid in 48 hours and must confirm the subscription to receive messages published to the topic.

  5. Click OK.

    The subscription you added is displayed in the subscription list.

    • To prevent malicious users from attacking subscription endpoints, SMN limits the number of confirmation messages that can be sent to an endpoint within a specified period of time. For details, see Traffic Control over Subscription Confirmation.
    • SMN does not check whether subscription endpoints exist when you add subscriptions. However, subscribers will not receive notification messages until they confirm their subscriptions.
    • After you add a subscription, SMN sends a confirmation message to the subscription endpoint. The message contains a link for confirming the subscription. The subscription confirmation link is valid within 48 hours. Confirm the subscription on your mobile phone, mailbox, or other endpoints in time.