forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rocketmq.yml
110 lines (110 loc) · 2.81 KB
/
rocketmq.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
ROSTemplateFormatVersion: '2015-09-01'
Description: ROCKETMQ Instance/Topic resource example
Parameters:
InstanceName:
Type: String
Description: The name of the instance, which contains 3 to 64 characters in Chinese
or English.
MinLength: 3
MaxLength: 64
GroupId:
Type: String
Description: |-
The group ID of the consumption cluster. When creating a group ID, pay attention to the following aspects:
A group ID starts with"GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).
A group ID ranges from 7 to 64 bytes.
Once a group ID is created, it cannot be edited anymore.
MinLength: 7
MaxLength: 64
TopicName:
Type: String
Description: |-
The name of the topic you want to create.
Note:
"CID" and "GID" are the reserved fields of a group ID, and they cannot be the start of a topic name.
If namespaces are available in the instance for which the topic is created, the topic name must be unique in the instance and can be duplicated across instances.
If no namespaces are available in the instance, the topic name must be unique both in the instance and across instances.
Perm:
Type: Number
Description: |-
Set the read-write mode for the topic Valid values.:
6: Both read and write operations are supported.
4: Write operation is prohibited.
2: Read operation is prohibited.
AllowedValues:
- 2
- 4
- 6
MessageType:
Type: Number
Description: |-
The type of the message. Valid values:
0: normal message
1: partitionally ordered message
2: globally ordered message
4: transactional message
5: scheduled/delayed message
AllowedValues:
- 0
- 1
- 2
- 4
- 5
Resources:
Instance:
Type: ALIYUN::ROCKETMQ::Instance
Properties:
InstanceName:
Ref: InstanceName
Group:
Type: ALIYUN::ROCKETMQ::Group
Properties:
InstanceId:
Fn::GetAtt:
- Instance
- InstanceId
GroupId:
Fn::Join:
- ''
- - GID-
- Ref: GroupId
DependsOn: Instance
Topic:
Type: ALIYUN::ROCKETMQ::Topic
Properties:
InstanceId:
Fn::GetAtt:
- Instance
- InstanceId
Topic:
Ref: TopicName
Perm:
Ref: Perm
MessageType:
Ref: MessageType
DependsOn: Group
Outputs:
InstanceId:
Description: Instance ID
Value:
Fn::GetAtt:
- Group
- InstanceId
GroupId:
Description: Group ID
Value:
Fn::GetAtt:
- Group
- GroupId
Topic:
Description: The name of the topic.
Value:
Fn::GetAtt:
- Topic
- Topic
MessageType:
Description: The type of the message.
Value:
Fn::GetAtt:
- Topic
- MessageType