Queries the information about message accumulation in topics to which a specified consumer group subscribes. The returned information includes the number of accumulated messages and the consumption latency.
Operation description
You can call this operation in scenarios in which you want to know the message consumption progress of a specified consumer group in production environments. You can obtain the information about message consumption and consumption latency based on the returned information. This operation returns the total number of accumulated messages in all topics to which the specified consumer group subscribes and the number of accumulated messages in each topic.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
mq:QueryConsumerAccumulate | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
GroupId | string | Yes | The ID of the consumer group. | GID_test_consumer_id |
Detail | boolean | No | Specifies whether to query the details of each topic to which the consumer group subscribes. Valid values:
| true |
InstanceId | string | Yes | The ID of the instance. | MQ_INST_111111111111_DOxxxxxx |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "CE817BFF-B389-43CD-9419-95011AC9****",
"Data": {
"ConsumeTps": 10,
"DelayTime": 10000,
"LastTimestamp": 1566231000000,
"TotalDiff": 100,
"Online": true,
"DetailInTopicList": {
"DetailInTopicDo": [
{
"DelayTime": 10000,
"TotalDiff": 100,
"LastTimestamp": 1566231000000,
"Topic": "test-mq-topic"
}
]
}
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
View the information about message accumulation in the console
You can also view the information about message accumulation in topics to which a consumer group subscribes in the ApsaraMQ for RocketMQ console. For more information, see View the status of consumers.