ALIYUN::ROCKETMQ5::ConsumerGroup is used to create a consumer group that belongs to a Message Queue for Apache RocketMQ V5.0 instance.

Syntax

{
  "Type": "ALIYUN::ROCKETMQ5::ConsumerGroup",
  "Properties": {
    "ConsumerGroupId": String,
    "InstanceId": String,
    "ConsumeRetryPolicy": Map,
    "DeliveryOrderType": String,
    "Remark": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
ConsumerGroupIdStringYesNoThe ID of the consumer group. The ID is globally unique and is used to identify a consumer group.

The following limits are imposed on the ID:

  • Character limit: The ID can contain letters, digits, underscores (_), hyphens (-), and percent signs (%).
  • Length limit: The ID must be 1 to 60 characters in length.
InstanceIdStringYesNoThe ID of the instance to which the consumer group belongs. None.
ConsumeRetryPolicyMapYesYesThe consumption retry policy that you want to configure for the consumer group.

None.

DeliveryOrderTypeStringYesYesThe delivery order type of the consumer group. Valid values:
  • Concurrently: concurrent delivery
  • Orderly: ordered delivery
RemarkStringNoYesThe remarks of the consumer group. None.

ConsumeRetryPolicy syntax

"ConsumeRetryPolicy": {
  "RetryPolicy": String,
  "MaxRetryTimes": Integer
}

ConsumeRetryPolicy properties

PropertyTypeRequiredEditableDescriptionConstraint
RetryPolicyStringYesYesThe type of the retry policy. Valid values:
  • FixedRetryPolicy: The system implements the retry policy at an incremental interval.
  • DefaultRetryPolicy: The system implements the retry policy at a fixed interval.
MaxRetryTimesIntegerNoYesThe maximum number of retries. None.

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 delivery order type of the consumer group.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ConsumerGroupId:
        Type: String
        Description: |-
          The ID of the consumer group to be created. Used to identify consumer groups, globally unique.
          The value description is as follows:
          Character limitation: supports letters a~z or A-Z, numbers 0-9, underscore (_), dash (-) and percent sign (%).
          Length limit: 1-60 characters.
        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: Delivery sequence of consumer group.
        Value:
          Fn::GetAtt:
            - ConsumerGroup
            - DeliveryOrderType
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ConsumerGroupId": {
          "Type": "String",
          "Description": "The ID of the consumer group to be created. Used to identify consumer groups, globally unique.\nThe value description is as follows:\nCharacter limitation: supports letters a~z or A-Z, numbers 0-9, underscore (_), dash (-) and percent sign (%).\nLength limit: 1-60 characters.",
          "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": "Delivery sequence of consumer group.",
          "Value": {
            "Fn::GetAtt": [
              "ConsumerGroup",
              "DeliveryOrderType"
            ]
          }
        }
      }
    }