Creates a consumer group in ApsaraMQ for RocketMQ 5.0.
Syntax
{
"Type": "ALIYUN::ROCKETMQ5::ConsumerGroup",
"Properties": {
"ConsumerGroupId": String,
"InstanceId": String,
"ConsumeRetryPolicy": Map,
"DeliveryOrderType": String,
"Remark": String
}
}
Properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
ConsumerGroupId |
String |
Yes |
No |
The ID of the consumer group. |
The ID must be globally unique. The value must meet the following requirements:
For information about reserved characters, see Quotas and limits. |
|
InstanceId |
String |
Yes |
No |
The ID of the instance to which the consumer group belongs. |
None |
|
ConsumeRetryPolicy |
Map |
Yes |
Yes |
The retry policy for the consumer group. |
For more information, see Consumption retry. |
|
DeliveryOrderType |
String |
Yes |
Yes |
The message delivery order of the consumer group. |
Valid values:
|
|
Remark |
String |
No |
Yes |
The custom remarks on the consumer group. |
None |
ConsumeRetryPolicy syntax
"ConsumeRetryPolicy": {
"RetryPolicy": String,
"MaxRetryTimes": Integer,
"DeadLetterTargetTopic": String
}
ConsumeRetryPolicy properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
RetryPolicy |
String |
Yes |
Yes |
The retry policy type. |
Valid values:
For more information, see Consumption retry. |
|
MaxRetryTimes |
Integer |
No |
Yes |
The maximum number of retry attempts. |
None |
|
DeadLetterTargetTopic |
String |
No |
Yes |
The dead-letter topic to which failed messages are routed. |
If a consumer fails to consume a message after the maximum number of retry attempts, the message is routed to the dead-letter topic for business recovery or troubleshooting. For more information, see Consumption retry. |
Return values
Fn::GetAtt
-
ConsumerGroupId: The ID of the consumer group.
-
InstanceId: The ID of the instance to which the consumer group belongs.
-
DeliveryOrderType: The message delivery order of the consumer group.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ConsumerGroupId:
Type: String
Description: |-
The ID of the consumer group to create. This ID must be globally unique.
The value can be 1 to 60 characters in length and can contain letters (a to z and A to Z), digits (0 to 9), underscores (_), hyphens (-), and percent signs (%).
MinLength: 1
MaxLength: 60
InstanceId:
Type: String
Description: The ID of the instance.
Resources:
ConsumerGroup:
Type: ALIYUN::ROCKETMQ5::ConsumerGroup
Properties:
ConsumerGroupId:
Ref: ConsumerGroupId
InstanceId:
Ref: InstanceId
ConsumeRetryPolicy:
RetryPolicy: DefaultRetryPolicy
MaxRetryTimes: 5
DeliveryOrderType: Concurrently
Outputs:
ConsumerGroupId:
Description: The ID of the consumer group.
Value:
Fn::GetAtt:
- ConsumerGroup
- ConsumerGroupId
InstanceId:
Description: The ID of the instance.
Value:
Fn::GetAtt:
- ConsumerGroup
- InstanceId
DeliveryOrderType:
Description: The delivery order of the consumer group.
Value:
Fn::GetAtt:
- ConsumerGroup
- DeliveryOrderType{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ConsumerGroupId": {
"Type": "String",
"Description": "The ID of the consumer group to create. This ID must be globally unique.\nThe value can be 1 to 60 characters in length and can contain letters (a to z and A to Z), digits (0 to 9), underscores (_), hyphens (-), and percent signs (%).",
"MinLength": 1,
"MaxLength": 60
},
"InstanceId": {
"Type": "String",
"Description": "The ID of the instance."
}
},
"Resources": {
"ConsumerGroup": {
"Type": "ALIYUN::ROCKETMQ5::ConsumerGroup",
"Properties": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupId"
},
"InstanceId": {
"Ref": "InstanceId"
},
"ConsumeRetryPolicy": {
"RetryPolicy": "DefaultRetryPolicy",
"MaxRetryTimes": 5
},
"DeliveryOrderType": "Concurrently"
}
}
},
"Outputs": {
"ConsumerGroupId": {
"Description": "The ID of the consumer group.",
"Value": {
"Fn::GetAtt": [
"ConsumerGroup",
"ConsumerGroupId"
]
}
},
"InstanceId": {
"Description": "The ID of the instance.",
"Value": {
"Fn::GetAtt": [
"ConsumerGroup",
"InstanceId"
]
}
},
"DeliveryOrderType": {
"Description": "The delivery order of the consumer group.",
"Value": {
"Fn::GetAtt": [
"ConsumerGroup",
"DeliveryOrderType"
]
}
}
}
}