Queries the detailed status of a specified group ID, including subscription relationships, consumption Transactions Per Second (TPS) statistics, load balancing status, and consumer connections.
Operation description
This operation is typically used to troubleshoot consumption exceptions after you assess the message stack and client online status. The returned result indicates whether the subscription relationships for the specified group ID are consistent and whether load balancing is normal. The result also provides the Jstack information for online clients.
This operation calls multiple backend operations for data aggregation, which slows down the query. 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 group ID of the consumer that you want to query. |
GID_test_group_id |
| Detail |
boolean |
No |
Specifies whether to query detailed information. Valid values:
|
true |
| NeedJstack |
boolean |
No |
Specifies whether to query the Jstack information. Valid values:
Note
To query the Jstack information, set the Detail parameter to true.
|
true |
| InstanceId |
string |
No |
The ID of the instance to which the group ID that you want to query belongs. |
MQ_INST_111111111111_DOxxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. This ID is unique to each request. Use this ID to troubleshoot 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 models, 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 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 |
| TotalDiff |
integer |
The total number of stacked messages in the cluster. |
197 |
| ConsumerConnectionInfoList |
object |
||
| ConsumerConnectionInfoDo |
array<object> |
The detailed information about the online clients in the cluster. This includes Jstack information and consumption response time (RT). To obtain the detailed information, set the Detail request parameter to true. Otherwise, this parameter is empty. |
|
|
array<object> |
test, this content is not pushed to icms |
||
| ConsumeModel |
string |
The consumption model. Valid values:
For more information about the two subscription models, see Clustering consumption and broadcasting consumption. |
CLUSTERING |
| RunningDataList |
object |
||
| ConsumerRunningDataDo |
array<object> |
The real-time state statistics. |
|
|
object |
|||
| Rt |
number |
The consumption RT, in 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 for successful message consumption. |
0 |
| FailedTps |
number |
The TPS for failed message consumption. |
0 |
| SubscriptionSet |
object |
||
| SubscriptionData |
array<object> |
The collection of subscription relationships. |
|
|
array<object> |
|||
| SubString |
string |
The tag expression that is used to subscribe to the topic. |
* |
| SubVersion |
integer |
The version number of the subscription relationship. 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 |
A subscribed tag. |
ff |
|
| Jstack |
object |
||
| ThreadTrackDo |
array<object> |
The Jstack information. To obtain the Jstack information, set the NeedJstack request parameter to true. Otherwise, this parameter is empty. |
|
|
array<object> |
test——Do not publish this content to icms |
||
| TrackList |
object |
||
| Track |
array |
The Jstack information string. |
|
|
string |
A Jstack information string. |
TID: 52 STATE: WAITING |
|
| Thread |
string |
The thread name. |
ConsumeMessageThread_0 |
| LastTimeStamp |
integer |
The last consumption time. This parameter is a UNIX timestamp in milliseconds. |
1570701368114 |
| StartTimeStamp |
integer |
The consumption start time. This parameter is a UNIX timestamp in milliseconds. |
1570701361528 |
| Language |
string |
The language of the client. |
JAVA |
| ClientId |
string |
The ID of the consumer instance. |
30.5.**.**@25560#-1999745829#-1737591554#458773089270275 |
| Connection |
string |
The connection information. |
** |
| Version |
string |
The version number of the client. |
V4_3_6 |
| ConsumeType |
string |
The mode in which the consumer consumes messages. Valid values:
|
PUSH |
| ThreadCount |
integer |
The number of consumer 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, set the Detail request parameter to true. Otherwise, this parameter is empty. |
|
|
object |
|||
| DelayTime |
integer |
The consumption latency for the specified topic, in milliseconds. |
0 |
| TotalDiff |
integer |
The total number of stacked messages in the topic. |
0 |
| LastTimestamp |
integer |
The last consumption time. This parameter 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 latency among all topics to which the specified group ID subscribes. Unit: milliseconds. |
100857 |
| LastTimestamp |
integer |
The last consumption time. This parameter is a UNIX timestamp in milliseconds. |
1566883844954 |
| Online |
boolean |
Indicates whether the consumer 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"
}
]
},
"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.