Tutorial: Subscribe to PDS event notifications using Simple Message Queue (formerly MNS)
You can configure event notification rules in the Drive and Photo Service (PDS) console. When a specified event for a resource operation occurs, you receive a notification at an endpoint specified in Simple Message Queue (formerly MNS). This ensures you receive timely notifications for specified events.
Scenario description
A company creates a domain named xxxx in the China (Hangzhou) region. The company wants to perform a secondary confirmation and collect data statistics after files are successfully uploaded. Therefore, the company needs to subscribe to file creation, deletion, and update events.
Step 1: Create a topic
Log on to the Simple Message Queue (formerly MNS) management console.
In the navigation pane on the left, click Topic List.
In the top navigation bar, select the China (Hangzhou) region.
On the Topic List page, click Create Topic.
In the Create Topic panel, set Topic Name to mytopic1 and keep the default configurations for other parameters.
Click OK.
In the navigation pane on the left, click Queue List.
On the Queue List page, click Create Queue.
In the Create Queue panel, set Queue Name to myqueue1 and keep the default configurations for other parameters.
Click OK.
Return to the mytopic1 topic page. In the navigation pane on the left, click Subscription Management. Create a subscription, set Push Type to Queue, and select the queue that you just created.
Step 2: Configure the notification subscription
Log on to the Drive and Photo Service (PDS) console.
In the top navigation bar, select the China (Hangzhou) region.
In the navigation pane on the left, click Drive and Photo Service (Developer Edition) - Domain List.
Click the xxxx domain. In the Notification Subscription section, click Edit.
Click OK. The configuration is complete.