Updated on 2024-07-18 GMT+08:00

Creating an SMN Topic

Scenario

Once you have created an SMN topic, you can easily subscribe to it by going to the Topic Management > Topics page of the SMN console. You can choose to receive notifications via SMS or email. After the subscription is successful, if a job fails, the system automatically sends a message to the subscription endpoint you specified.

  • If a job fails within 1 minute of submission, a message notification is not triggered.
  • If a job fails after 1 minute of submission, the system automatically sends a message to the subscriber terminal you specified.

Procedure

  1. On the Resources > Queue Management page, click Create SMN Topic on the upper left side. The Create SMN Topic dialog box is displayed.
    Figure 1 Creating an SMN topic
  2. Select a queue and click OK.
    • You can select a single queue or all queues.
    • If you create a topic for a queue and another topic for all queues, the SMN of all queues does not include the message of the single queue.
    • After a message notification topic is created, you will receive a message notification only when a Spark job created on the subscription queue fails.
    Figure 2 Successfully created a topic

  3. Click Topic Management in to go to the Topic Management page of the SMN service.
    Figure 3 Topic management page
  4. In the Operation column of the topic, click Add Subscription. Select Protocol to determine the subscription mode.
    • If you select SMS for the subscription protocol, you need to enter the mobile number for receiving the confirmation SMS message in the Endpoint text box.
    • If you select Email, enter the email address for receiving the confirmation email in the Endpoint text box.
    Figure 4 Adding a subscription
  5. After you click the link in the SMS message or email, you will receive a message indicating that the subscription is successful.
  6. Go to the Subscriptions page of SMN, and check that subscription status is Confirmed.