All Products
Search
Document Center

ApsaraMQ for RocketMQ:GetConsumerGroup

Last Updated:Dec 19, 2025

Retrieves the details of a specified consumer group.

Operation description

Important Alibaba Cloud OpenAPI is a control plane API used to manage and query Alibaba Cloud service resources. Integrate this API only into your control plane. Do not use it for core data links that involve sending and receiving messages, because this can introduce threats.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:GetConsumerGroup

get

*ConsumerGroup

acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}/consumergroup/{#ConsumerGroupId}

None None

Request syntax

GET /instances/{instanceId}/consumerGroups/{consumerGroupId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The ID of the instance that contains the consumer group.

rmq-cn-7e22ody****

consumerGroupId

string

Yes

The ID of the consumer group.

CID-TEST

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

Result<ConsumerGroupDTO>

requestId

string

The request ID. This ID is unique to each request and can be used to troubleshoot issues.

C7F94090-3358-506A-97DC-34BC803C****

success

boolean

Indicates whether the request was successful.

true

data

object

The result of the request.

regionId

string

The ID of the region where the instance resides.

cn-hangzhou

instanceId

string

The ID of the instance to which the consumer group belongs.

rmq-cn-7e22ody****

consumerGroupId

string

The ID of the consumer group.

CID-TEST

status

string

The status of the consumer group.

Valid values:

  • RUNNING :

    The consumer group is running.

  • CREATING :

    The consumer group is being created.

RUNNING

remark

string

The remarks on the consumer group.

This is the remark for test.

createTime

string

The time when the consumer group was created.

2022-08-01 20:05:50

updateTime

string

The time when the consumer group was last updated.

2022-08-01 20:05:50

deliveryOrderType

string

The delivery order of the consumer group.

Valid values:

  • Concurrently :

    Messages are delivered concurrently.

  • Orderly :

    Messages are delivered in order.

Concurrently

consumeRetryPolicy

object

The consumption retry policy of the consumer group. For more information, see Consumption retry.

retryPolicy

string

The type of the retry policy.

Valid values:

  • FixedRetryPolicy :

    Messages are retried at a fixed interval.

  • DefaultRetryPolicy :

    Messages are retried with backoff.

DefaultRetryPolicy

maxRetryTimes

integer

The maximum number of retries.

16

deadLetterTargetTopic

string

The dead-letter topic.

If a message fails to be consumed after the maximum number of retries, it is sent to a dead-letter topic. You can use the dead-letter topic for business recovery or message tracing. For more information, see Consumption retry and dead-letter messages.

DLQ_mqtest

fixedIntervalRetryTime

integer

The fixed retry interval. Unit: seconds. The valid range is:

  • Concurrently: 10 to 1800

  • Orderly: 1 to 600

20

maxReceiveTps

integer

The maximum Transaction Per Second (TPS) for message consumption.

2000

messageModel

string

The consumption mode:

  • CLUSTERING: Clustering consumption

  • LITE_SELECTIVE: LITE_SELECTIVE

LITE_SELECTIVE

topicName

string

The name of the lite topic.

test1

code

string

The error code.

InvalidConsumerGroupId

message

string

The error message.

Parameter consumerGroupId is invalid.

httpStatusCode

integer

The HTTP status code.

400

dynamicCode

string

The dynamic error code.

ConsumerGroupId

dynamicMessage

string

The dynamic error message.

consumerGroupId

Examples

Success response

JSON format

{
  "requestId": "C7F94090-3358-506A-97DC-34BC803C****",
  "success": true,
  "data": {
    "regionId": "cn-hangzhou",
    "instanceId": "rmq-cn-7e22ody****",
    "consumerGroupId": "CID-TEST",
    "status": "RUNNING",
    "remark": "This is the remark for test.",
    "createTime": "2022-08-01 20:05:50",
    "updateTime": "2022-08-01 20:05:50",
    "deliveryOrderType": "Concurrently",
    "consumeRetryPolicy": {
      "retryPolicy": "DefaultRetryPolicy",
      "maxRetryTimes": 16,
      "deadLetterTargetTopic": "DLQ_mqtest",
      "fixedIntervalRetryTime": 20
    },
    "maxReceiveTps": 2000,
    "messageModel": "LITE_SELECTIVE",
    "topicName": "test1"
  },
  "code": "InvalidConsumerGroupId",
  "message": "Parameter consumerGroupId is invalid.",
  "httpStatusCode": 400,
  "dynamicCode": "ConsumerGroupId",
  "dynamicMessage": "consumerGroupId"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.