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 one to which you have been granted permissions and how to delete subscriptions.
To Add a Subscription
- Log in to the management console.
- Click on the upper left to select the desired region and project.
- In the Application category, click Simple Message Notification.
The SMN console is displayed.
- In the navigation pane, choose Subscriptions.
- Click Add Subscription.
The Add Subscription box is displayed.
Figure 1 Add Subscription
- Specify the required subscription information.
Click beside the Topic Name box to select a topic.
Specify the subscription protocol and endpoints.
Table 1 Required subscription information
Name of the topic to subscribe to
Protocol the subscription endpoints support. The available options include SMS, DMS, Email, HTTP, and HTTPS.
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.
- Email: Enter one or more valid email addresses.
- HTTP or HTTPS: Enter one or more public network URLs.
- DMS: Click to select a message queue. Ensure that the queue policy grants the DMS:ProduceMessages permission to SMN. For details, see section "Managing Queue Policies" in the Distributed Message Service User Guide.
- 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 section Control on 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.
- The token is valid only for 48 hours. Therefore, subscribers must confirm subscriptions within that time.