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

Creating a Topic

Scenarios

A topic is a specified event to publish messages and subscribe to notifications. It serves as a message sending channel, where publishers and subscribers can interact with each other.

Creating a Topic

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Click . Select Simple Message Notification under Management & Governance.

    The SMN console is displayed.

  4. In the navigation pane on the left, choose Topic Management > Topics.

    The Topics page is displayed.

  5. In the upper right corner, click Create Topic.
    Figure 1 Create Topic
  6. Enter a topic name and display name.
    Table 1 Parameter descriptions

    Parameter

    Description

    Topic Name

    Topic name, which:

    • Contains only letters, digits, hyphens (-), and underscores (_) and must start with a letter or digit.
    • Contains 1 to 255 characters.
    • Must be unique and cannot be modified once the topic is created.

    Display Name

    Message sender name, which can contain up to 192 bytes

    NOTE:

    After you specify a display name, the sender in email messages will be presented as Display name<username@example.com>. Otherwise, the sender will be username@example.com.

    Enterprise Project

    Centrally manages cloud resources and members by project.

    CTS Log

    Whether to enable CTS log.

    Log Group

    Select a log group.

    A log group is a group of log streams which share the same log retention settings. For details, see Log Groups.

    Log Stream

    Select a log stream in the specified log group.

    A log stream is the basic unit for log reads and writes. You can sort logs of different types, such as operation logs and access logs, into different log streams. For details, see Log Streams.

    Tag

    A tag is a key-value pair. Tags identify cloud resources so that you can easily categorize and search for your resources.

    If you have configured tag policies for message notifications, add tags to your topics based on the tag policies. If you add a tag that does not comply with the tag policies, topics may fail to be created. Contact the administrator to learn more about tag policies.

    • A key can contain up to 128 characters, and a value can contain up to 255 characters.
    • A tag key can contain letters, digits, spaces, and special characters (_.:=+-@), but cannot start or end with a space or start with _sys_.
    • A tag value can contain letters, digits, spaces, and any of the following characters: _.:/=+-@
    • You can add up to 20 tags for each topic.
  7. Click OK.

    The topic you created is displayed in the topic list. The system generates a topic URN, which is the unique resource identifier of the topic and cannot be changed.

  8. Click the name of the topic to view its details, including the topic URN , display name, logs,tags,and subscriptions.
    Figure 2 Topic details and subscriptions