Queries the detailed status data of a specified group ID, including subscription consistency check, consumption TPS statistics, load balancing status, and consumer connections.
Operation description
This operation is typically used to troubleshoot the causes of consumption exceptions after a rough check on message accumulation and client online status. Based on the returned results, you can determine whether the subscription relationships of the specified group ID are consistent, whether load balancing is normal, and obtain the Jstack information of online clients.
This operation calls a large number of backend API operations to aggregate data. Therefore, the query speed is slow. Do not call this operation frequently.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:QueryConsumerStatus |
get |
Group
Group
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GroupId |
string |
Yes |
The ID of the consumer group to query. |
GID_test_group_id |
| Detail |
boolean |
No |
Specifies whether to query detailed information. Valid values:
|
true |
| NeedJstack |
boolean |
No |
Specifies whether to print Jstack information. Valid values:
Note
To print Jstack information, make sure that the Detail request parameter is set to true.
|
true |
| InstanceId |
string |
No |
The instance ID corresponding to the Group ID to query. |
MQ_INST_111111111111_DOxxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The common parameter. The ID of each request is unique and can be used to troubleshoot and locate issues. |
10EDC518-10E7-4B34-92FB-171235FA**** |
| Data |
object |
The query results. |
|
| ConsumeTps |
number |
The total consumption TPS. |
0 |
| ConsumeModel |
string |
The consumption model. Valid values:
For more information about the two subscription modes, see Clustering consumption and broadcasting consumption. |
CLUSTERING |
| ConnectionSet |
object |
||
| ConnectionDo |
array<object> |
The information about the online clients in the cluster. |
|
|
object |
|||
| RemoteIP |
string |
The IP address of the host or the public IP address. |
42.120.74.** |
| Version |
string |
The version of the consumer. |
V4_3_6_SNAPSHOT |
| ClientAddr |
string |
The IP address and port of the consumer instance. |
30.5.121.** |
| Language |
string |
The language of the consumer. |
JAVA |
| ClientId |
string |
The ID of the consumer instance. |
30.5.121.**@25560#-1999745829#-1737591554#458773089270275 |
| Diff |
integer |
The number of accumulated messages per client. |
100 |
| TotalDiff |
integer |
The total message accumulation in the cluster. |
197 |
| ConsumerConnectionInfoList |
object |
||
| ConsumerConnectionInfoDo |
array<object> |
The detailed information about the online clients in the cluster, including Jstack and consumption response time (RT). To obtain the detailed information, make sure that the Detail request parameter is set to true. Otherwise, the returned value is empty. |
|
|
array<object> |
The test content. This content is not pushed to ICMS. |
||
| ConsumeModel |
string |
The consumption model. Valid values:
For more information about the two subscription modes, see Clustering consumption and broadcasting consumption. |
CLUSTERING |
| RunningDataList |
object |
||
| ConsumerRunningDataDo |
array<object> |
The real-time status statistics. |
|
|
object |
|||
| Rt |
number |
The consumption RT. Unit: milliseconds. |
0 |
| Topic |
string |
The name of the subscribed topic. |
test-mq_topic |
| FailedCountPerHour |
integer |
The number of messages that failed to be consumed per hour. |
0 |
| OkTps |
number |
The TPS of successfully consumed messages. |
0 |
| FailedTps |
number |
The TPS of messages that failed to be consumed. |
0 |
| SubscriptionSet |
object |
||
| SubscriptionData |
array<object> |
The subscription relationship set. |
|
|
array<object> |
|||
| SubString |
string |
The tag expression for the subcategory of the subscribed topic. |
* |
| SubVersion |
integer |
The version number of the subscription relationship. The value is an auto-incrementing long integer. |
1570701364301 |
| Topic |
string |
The name of the subscribed topic. |
test-mq_topic |
| TagsSet |
object |
||
| Tag |
array |
The set of subscribed tags. |
|
|
string |
The set of subscribed tags. |
ff |
|
| Jstack |
object |
||
| ThreadTrackDo |
array<object> |
The Jstack information. To obtain the Jstack information, make sure that the NeedJstack request parameter is set to true. Otherwise, the returned value is empty. |
|
|
array<object> |
The test content. This content is not published to ICMS. |
||
| TrackList |
object |
||
| Track |
array |
The Jstack information string. |
|
|
string |
The Jstack information string. |
TID: 52 STATE: WAITING |
|
| Thread |
string |
The thread name. |
ConsumeMessageThread_0 |
| LastTimeStamp |
integer |
The last consumption time. The value is a UNIX timestamp in milliseconds. |
1570701368114 |
| StartTimeStamp |
integer |
The consumption start time. The value is a UNIX timestamp in milliseconds. |
1570701361528 |
| Language |
string |
The client language. |
JAVA |
| ClientId |
string |
The ID of the consumer instance. |
30.5.**.**@25560#-1999745829#-1737591554#458773089270275 |
| Connection |
string |
The connection information. |
** |
| Version |
string |
The client version. |
V4_3_6 |
| ConsumeType |
string |
The message consumption mode of the consumer. Valid values:
|
PUSH |
| ThreadCount |
integer |
The number of consumption threads. |
20 |
| InstanceId |
string |
The instance ID. |
MQ_INST_111111111111_DOxxxxxx |
| DetailInTopicList |
object |
||
| DetailInTopicDo |
array<object> |
The consumption status of each topic. To obtain the detailed information, make sure that the Detail request parameter is set to true. Otherwise, the returned value is empty. |
|
|
object |
|||
| DelayTime |
integer |
The consumption delay time of the specified topic. Unit: milliseconds. |
0 |
| TotalDiff |
integer |
The total number of accumulated messages for the topic. |
0 |
| LastTimestamp |
integer |
The last consumption time. The value is a UNIX timestamp in milliseconds. |
1570701259403 |
| Topic |
string |
The topic name. |
test-mq_topic |
| SubscriptionSame |
boolean |
Indicates whether the subscription relationships are consistent. |
true |
| DelayTime |
integer |
The maximum consumption delay time among all topics subscribed by the specified group ID. Unit: milliseconds. |
100857 |
| LastTimestamp |
integer |
The last consumption time. The value is a UNIX timestamp in milliseconds. |
1566883844954 |
| Online |
boolean |
Indicates whether the client is online. |
true |
| RebalanceOK |
boolean |
Indicates whether client rebalancing is normal. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "10EDC518-10E7-4B34-92FB-171235FA****",
"Data": {
"ConsumeTps": 0,
"ConsumeModel": "CLUSTERING",
"ConnectionSet": {
"ConnectionDo": [
{
"RemoteIP": "42.120.74.**",
"Version": "V4_3_6_SNAPSHOT",
"ClientAddr": "30.5.121.**",
"Language": "JAVA",
"ClientId": "30.5.121.**@25560#-1999745829#-1737591554#458773089270275",
"Diff": 100
}
]
},
"TotalDiff": 197,
"ConsumerConnectionInfoList": {
"ConsumerConnectionInfoDo": [
{
"ConsumeModel": "CLUSTERING",
"RunningDataList": {
"ConsumerRunningDataDo": [
{
"Rt": 0,
"Topic": "test-mq_topic",
"FailedCountPerHour": 0,
"OkTps": 0,
"FailedTps": 0
}
]
},
"SubscriptionSet": {
"SubscriptionData": [
{
"SubString": "*",
"SubVersion": 1570701364301,
"Topic": "test-mq_topic",
"TagsSet": {
"Tag": [
"ff"
]
}
}
]
},
"Jstack": {
"ThreadTrackDo": [
{
"TrackList": {
"Track": [
"TID: 52 STATE: WAITING"
]
},
"Thread": "ConsumeMessageThread_0"
}
]
},
"LastTimeStamp": 1570701368114,
"StartTimeStamp": 1570701361528,
"Language": "JAVA",
"ClientId": "30.5.**.**@25560#-1999745829#-1737591554#458773089270275",
"Connection": "**",
"Version": "V4_3_6",
"ConsumeType": "PUSH",
"ThreadCount": 20
}
]
},
"InstanceId": "MQ_INST_111111111111_DOxxxxxx",
"DetailInTopicList": {
"DetailInTopicDo": [
{
"DelayTime": 0,
"TotalDiff": 0,
"LastTimestamp": 1570701259403,
"Topic": "test-mq_topic"
}
]
},
"SubscriptionSame": true,
"DelayTime": 100857,
"LastTimestamp": 1566883844954,
"Online": true,
"RebalanceOK": true
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.