Updated on 2024-10-12 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. Select Simple Message Notification under Application.

    The SMN console is displayed.

  2. In the navigation pane on the left, 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.
    Table 1 Parameters for adding a subscription

    Parameter

    Description

    Topic Name

    Specifies the name of the topic to which messages are published.

    Protocol

    Specifies the protocol over which messages are sent. Possible values are SMS, HTTP, HTTPS, DingTalk chatbot, WeCom chatbot, Lark chatbot, and Email.

    NOTE:
    • DingTalk chatbot, WeCom chatbot, and Lark chatbot are in the open beta test (OBT). To use any of these, submit a service ticket to apply for the OBT.
    • After the OBT is enabled, the current token will be invalid. Log in to the console again, and a new token will be generated.
    • The number of WeCom, DingTalk, or Lark messages that can be sent is limited, and the recipient system may be faulty.

      In this case, SMN cannot ensure successful message delivery.

    Endpoint

    Specifies the subscription endpoint. You can add up to 10 SMS, email, HTTP, or HTTPS endpoints, one in each line.

    • SMS: Enter one or more valid phone numbers.

      Examples:

      +353876612345

      +353 876612345

      +353-876612345

      +353/876612345

    • Email: Enter one or more valid email addresses.

      Examples:

      username@example.com

      username2@example.com

    • HTTP: Enter one or more public network URLs.

      Example:

      http://example.com/notification/action

    • HTTPS: Enter one or more public network URLs.

      Example:

      https://example.com/notification/action

  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. For details, see section "Traffic Control on Subscription Confirmation" in Simple Message Notification User Guide.
    • SMN does not check whether subscription endpoints exist when you add subscriptions.
    • After you add a subscription or request subscription confirmation, SMN will send a confirmation message to the endpoints, and the link in the confirmation message will be valid for 48 hours.
    • Subscription confirmation messages will be counted as messages sent and will be billed.