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:
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:
|
Return values
Fn::GetAtt
- InstanceId: The instance ID.
- MessageType: The message type.
- TopicName: The topic name.
Examples
-
JSONformat{ "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" ] } } } }