All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ROCKETMQ5::Topic

更新時間:Jun 03, 2026

ALIYUN::ROCKETMQ5::Topic creates a topic in a RocketMQ 5.0 instance.

Syntax

{
  "Type": "ALIYUN::ROCKETMQ5::Topic",
  "Properties": {
    "InstanceId": String,
    "MessageType": String,
    "Remark": String,
    "TopicName": String
  }
}

Properties

Property name Type Required Update allowed Description Constraints
InstanceId String Yes No The instance ID. None
MessageType String Yes No The message type. Valid values:
  • TRANSACTION: Transactional message.
  • FIFO: Ordered message.
  • DELAY: Scheduled or delayed message.
  • NORMAL: Normal message.
Note The topic message type must match the messages sent to it. A topic created for ordered messages can only send and receive ordered messages.
Remark String No Yes Custom remarks for the topic. None
TopicName String Yes No The topic name. Must be globally unique.

Requirements:

  • Can contain letters (a–z, A–Z), digits (0–9), underscores (_), hyphens (-), and percent signs (%).
  • Length: 1–60 characters.

Return values

Fn::GetAtt

  • InstanceId: The instance ID.
  • MessageType: The message type.
  • TopicName: The topic name.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceId:
        Type: String
        Description: The ID of the instance.
    Resources:
      Topic:
        Type: ALIYUN::ROCKETMQ5::Topic
        Properties:
          InstanceId:
            Ref: InstanceId
          MessageType: NORMAL
          TopicName: TestTopic
    Outputs:
      InstanceId:
        Description: The ID of the instance.
        Value:
          Fn::GetAtt:
            - Topic
            - InstanceId
      MessageType:
        Description: The type of the message.
        Value:
          Fn::GetAtt:
            - Topic
            - MessageType
      TopicName:
        Description: The name of the topic.
        Value:
          Fn::GetAtt:
            - Topic
            - TopicName
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "Description": "The ID of the instance."
        }
      },
      "Resources": {
        "Topic": {
          "Type": "ALIYUN::ROCKETMQ5::Topic",
          "Properties": {
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "MessageType": "NORMAL",
            "TopicName": "TestTopic"
          }
        }
      },
      "Outputs": {
        "InstanceId": {
          "Description": "The ID of the instance.",
          "Value": {
            "Fn::GetAtt": [
              "Topic",
              "InstanceId"
            ]
          }
        },
        "MessageType": {
          "Description": "The type of the message.",
          "Value": {
            "Fn::GetAtt": [
              "Topic",
              "MessageType"
            ]
          }
        },
        "TopicName": {
          "Description": "The name of the topic.",
          "Value": {
            "Fn::GetAtt": [
              "Topic",
              "TopicName"
            ]
          }
        }
      }
    }