Adding a Subscription to a Topic¶
To deliver messages published to a topic to subscription endpoints, you must add the endpoints to the topic.
To Add a Subscription¶
Log in to the management console.
Click on the upper left to select the desired region and project.
Under Application, select Simple Message Notification.
The SMN console is displayed.
In the navigation pane, choose Topics.
The Topics page is displayed.
Locate the topic that you want to add a subscription to. In the Operation column, choose More > Add Subscription.
The Add Subscription dialog box is displayed.
Specify the subscription protocol and endpoints. You can enter 10 endpoints at most, each on a separate line.
Enter a valid email address, for example, email@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.
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.
Enter a valid mobile number preceded by a plus sign (+) and a country code .Example: +4900000000
Subscribers will receive a subscription confirmation message valid in 48 hours and must confirm the subscription to receive messages published to the topic.
Subscription endpoints are message queues. This type of subscriptions does not require confirmation. Click to select subscription endpoints. When you select DMS queues, grant the ProduceMessages permission to SMN in the queue policy. For details, see section "Managing Queue Policies" in the Distributed Message Service User Guide.
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 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.