Queries the message accumulation of a consumer group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:GetConsumerGroupLag |
get |
*ConsumerGroup
|
None | None |
Request syntax
GET /instances/{instanceId}/consumerGroups/{consumerGroupId}/lag HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
rmq-cn-2r42vrvde0j |
| consumerGroupId |
string |
Yes |
The consumer group ID. |
CID-TEST |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| topicName |
string |
No |
The name of the topic to which the consumer group subscribes. |
normal-topic-1 |
| liteTopicName |
string |
No |
The name of the lite topic. |
abc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Result<ConsumerGroupLagDto> |
||
| requestId |
string |
The request ID. |
F5764C40-FB8C-53AE-B95D-96AB3D0E9375 |
| success |
boolean |
Indicates whether the request was successful. |
true |
| data |
object |
The returned data. |
|
| regionId |
string |
The region ID. |
cn-hangzhou |
| instanceId |
string |
The instance ID. |
rmq-cn-7e22ody**** |
| consumerGroupId |
string |
The consumer group ID. |
CID-TEST |
| totalLag |
object |
The total message accumulation. |
|
| readyCount |
integer |
The number of ready messages. |
1 |
| inflightCount |
integer |
The number of inflight messages. |
1 |
| deliveryDuration |
integer |
The delivery latency. Unit: seconds. |
12 |
| lastConsumeTimestamp |
integer |
The timestamp of the last consumption. |
1735629607846 |
| topicLagMap |
object |
The message accumulation for each topic. |
|
|
object |
The message accumulation details. |
||
| readyCount |
integer |
The number of ready messages. |
1 |
| inflightCount |
integer |
The number of inflight messages. |
1 |
| deliveryDuration |
integer |
The delivery latency. Unit: seconds. |
12 |
| lastConsumeTimestamp |
integer |
The timestamp of the last consumption. |
1735629607846 |
| topicName |
string |
The name of the subscribed topic. |
test1 |
| liteTopicLagMap |
object |
The message accumulation for lite topics. |
|
|
object |
The message accumulation for the lite topic. |
||
| readyCount |
integer |
The number of accumulated messages. |
300 |
| deliveryDuration |
integer |
The delivery latency. Unit: seconds. |
30 |
| code |
string |
The error code. |
Topic.NotFound |
| message |
string |
The error message. |
Parameter instanceId is mandatory for this action . |
| httpStatusCode |
integer |
The HTTP status code. |
200 |
| dynamicCode |
string |
The dynamic error code. |
InstanceId |
| dynamicMessage |
string |
The dynamic error message. |
instanceId |
Examples
Success response
JSON format
{
"requestId": "F5764C40-FB8C-53AE-B95D-96AB3D0E9375",
"success": true,
"data": {
"regionId": "cn-hangzhou",
"instanceId": "rmq-cn-7e22ody****",
"consumerGroupId": "CID-TEST",
"totalLag": {
"readyCount": 1,
"inflightCount": 1,
"deliveryDuration": 12,
"lastConsumeTimestamp": 1735629607846
},
"topicLagMap": {
"key": {
"readyCount": 1,
"inflightCount": 1,
"deliveryDuration": 12,
"lastConsumeTimestamp": 1735629607846
}
},
"topicName": "test1",
"liteTopicLagMap": {
"key": {
"readyCount": 300,
"deliveryDuration": 30
}
}
},
"code": "Topic.NotFound",
"message": "Parameter instanceId is mandatory for this action .",
"httpStatusCode": 200,
"dynamicCode": "InstanceId",
"dynamicMessage": "instanceId"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.