This operation queries detailed status data for a specified group ID, including subscription relationship checks, consumption TPS statistics, load balancing status, and consumer-side connections.
Operation description
You can use this operation to troubleshoot abnormal consumption after you confirm message accumulation or client online status. The response helps you verify the consistency of subscription relationships for a specified group ID, confirm normal load balancing, and retrieve Jstack information for online clients.
This operation calls many backend interfaces to aggregate data, which can cause it to run slowly. Therefore, avoid frequent calls.
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 group ID of the consumer to query. |
GID_test_group_id |
| Detail |
boolean |
No |
Whether to return detailed information. Valid values:
|
true |
| NeedJstack |
boolean |
No |
Whether to print Jstack information. Valid values:
Note
To print Jstack information, set the Detail request parameter to true.
|
true |
| InstanceId |
string |
No |
The instance ID associated with the group ID to query. |
MQ_INST_111111111111_DOxxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
A common parameter. Each request has a unique ID. Use it to locate and troubleshoot issues. |
10EDC518-10E7-4B34-92FB-171235FA**** |
| Data |
object |
The query result. |
|
| ConsumeTps |
number |
Total consumption TPS. |
0 |
| ConsumeModel |
string |
The consumption model. Valid values:
For more information about these subscription modes, see Clustering and broadcasting consumption. |
CLUSTERING |
| ConnectionSet |
object |
||
| ConnectionDo |
array<object> |
Information about currently online clients in the cluster. |
|
|
object |
|||
| RemoteIP |
string |
The host IP address or public IP address. |
42.120.74.** |
| Version |
string |
The consumer version. |
V4_3_6_SNAPSHOT |
| ClientAddr |
string |
The address and port of the consumer instance. |
30.5.121.** |
| Language |
string |
The consumer language. |
JAVA |
| ClientId |
string |
The ID of the consumer instance. |
30.5.121.**@25560#-1999745829#-1737591554#458773089270275 |
| Diff |
integer |
100 |
|
| TotalDiff |
integer |
Total message accumulation across the cluster. |
197 |
| ConsumerConnectionInfoList |
object |
||
| ConsumerConnectionInfoDo |
array<object> |
Detailed information about online clients in the cluster, including Jstack and consumption RT. To get this information, set the Detail request parameter to true. Otherwise, the response is empty. |
|
|
array<object> |
test, this content is not published to ICMS |
||
| ConsumeModel |
string |
The consumption model. Valid values:
For more information about these subscription modes, see Clustering and broadcasting consumption. |
CLUSTERING |
| RunningDataList |
object |
||
| ConsumerRunningDataDo |
array<object> |
Real-time status statistics. |
|
|
object |
|||
| Rt |
number |
Consumption response time (RT), in milliseconds. |
0 |
| Topic |
string |
The name of the subscribed topic. |
test-mq_topic |
| FailedCountPerHour |
integer |
Number of messages that failed to consume per hour. |
0 |
| OkTps |
number |
TPS for successfully consumed messages. |
0 |
| FailedTps |
number |
TPS for messages that failed to consume. |
0 |
| SubscriptionSet |
object |
||
| SubscriptionData |
array<object> |
The collection of subscription relationships. |
|
|
array<object> |
|||
| SubString |
string |
The tag expression used to subscribe to the topic. |
* |
| SubVersion |
integer |
The subscription relationship version number. This is an auto-incrementing long integer. |
1570701364301 |
| Topic |
string |
The name of the subscribed topic. |
test-mq_topic |
| TagsSet |
object |
||
| Tag |
array |
The collection of subscribed tags. |
|
|
string |
The collection of subscribed tags. |
ff |
|
| Jstack |
object |
||
| ThreadTrackDo |
array<object> |
Jstack stack trace. To get Jstack information, set the NeedJstack request parameter to true. Otherwise, the response is empty. |
|
|
array<object> |
test—this content is not published to ICMS |
||
| TrackList |
object |
||
| Track |
array |
The Jstack stack trace string. |
|
|
string |
The Jstack stack trace string. |
TID: 52 STATE: WAITING |
|
| Thread |
string |
The thread name. |
ConsumeMessageThread_0 |
| LastTimeStamp |
integer |
The timestamp of the last consumption. This value uses millisecond-level Unix timestamps. |
1570701368114 |
| StartTimeStamp |
integer |
The timestamp when consumption started. This value uses millisecond-level Unix timestamps. |
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 number. |
V4_3_6 |
| ConsumeType |
string |
The message consumption mode. 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> |
Consumption details for each topic. To get this information, set the Detail request parameter to true. Otherwise, the response is empty. |
|
|
object |
|||
| DelayTime |
integer |
The consumption delay time for the specified topic, in milliseconds. |
0 |
| TotalDiff |
integer |
The total message accumulation for the topic. |
0 |
| LastTimestamp |
integer |
The timestamp of the last consumption. This value uses millisecond-level Unix timestamps. |
1570701259403 |
| Topic |
string |
The topic name. |
test-mq_topic |
| SubscriptionSame |
boolean |
Whether subscription relationships are consistent. |
true |
| DelayTime |
integer |
The maximum consumption delay time across all topics subscribed to by the specified group ID, in milliseconds. |
100857 |
| LastTimestamp |
integer |
The timestamp of the last consumption. This value uses millisecond-level Unix timestamps. |
1566883844954 |
| Online |
boolean |
Whether the client is online. |
true |
| RebalanceOK |
boolean |
Whether 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.