Adding a Subscription

Scenarios

To deliver messages published to a topic to endpoints, you must add the subscription endpoints to the topic. Endpoints can be email addresses, phone numbers, message queues, and HTTP/HTTPS URLs. After you add endpoints to the topic and the subscribers confirm the subscription, they are able to receive messages published to the topic.

You can add multiple subscriptions to each topic. This section describes how to add subscriptions to a topic you created or a topic that you have been granted permissions to and how to delete subscriptions.

To Add a Subscription

  1. Log in to the management console.

  2. Click image1 on the upper left to select the desired region and project.

  3. Under Application, select Simple Message Notification.

    The SMN console is displayed.

  4. In the navigation pane, choose Subscriptions.

  5. In the upper right corner, click Add Subscription.

    The Add Subscription dialog box is displayed.

    **Figure 1** Add Subscription

    Figure 1 Add Subscription

  6. Specify the required subscription information.

    1. Click image2 beside the Topic Name box to select a topic.

    2. Specify the subscription protocol and endpoints.

      Table 1 Parameter descriptions

      Parameter

      Description

      Topic Name

      Name of the topic to be subscribed to

      Protocol

      Protocol that the subscription endpoints support. The available protocols are SMS, Email, HTTP, and HTTPS.

      Endpoint

      Subscription endpoint. You can enter up to 10 SMS, email, HTTP, or HTTPS endpoints, one in each line.

      • SMS: Enter one or more valid phone numbers.

        The phone number is preceded by a plus sign (+) and a country code.

        Example:

        +4900000000

        +4900000001

        +4900000002

        +4900000003

      • Email: Enter one or more valid email addresses.

        Example:

        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

      • DMS: Click image3 to select a message queue. Ensure that the queue policy grants the ProduceMessages permission to SMN. For details, see section "Managing Queue Policies" in the Distributed Message Service User Guide.

  7. Click OK.

    The subscription you added is displayed in the subscription list.

    Note

    • 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 Control over Subscription Confirmation Traffic.

    • 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.