查询指定 Group ID 的详细状态数据,包含订阅关系检查、消费 TPS 统计、负载均衡状态、消费端连接等。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String GetMqSofamqConsumerStatus

系统规定参数。取值:GetMqSofamqConsumerStatus。

Cell String RZ01A

需要查询的单元

Detail Boolean true

是否查询详细信息。取值说明如下:

true:要查询详细信息
false:不查询详细信息。

GroupId String GID_test_group_id

需要查询的消费端 Group ID

InstanceId String MQ_INST_111111111111_DOxxxxxx

需查询的 Group ID 所对应的实例 ID。针对有独立命名空间的实例,该参数为必填。

NeedJstack Boolean false

是否打印 Jstack 信息

返回数据

名称 类型 示例值 描述
Data Struct

查询结果

ConnectionSet Array

该集群当前在线客户端信息

ClientAddr String 30.5.121.

该消费实例的地址和端口

ClientId String 30.5.121.@25560#-1999745829#-1737591554#458773089270275

消费实例的 ID

Language String JAVA

消费端语言

RemoteIp String 42.120.74.

宿主机 IP 或公网 IP

Version String V4_3_6_SNAPSHOT

消费端版本

ConsumeModel String CLUSTERING

消费模型。取值说明如下:

CLUSTERING:集群消费模式
BROADCASTING:广播消费模式。

ConsumeTps String 0

总消费 TPS

ConsumerConnectionInfoList Array

该集群在线客户端详细信息,包含 Jstack、消费 RT 时间等信息

ClientId String 30.5..@25560#-1999745829#-1737591554#458773089270275

消费实例的 ID

Connection String

连接信息

ConsumeType String PUSH

PUSH/PULL

Jstack Array

Jstack 堆栈信息

Thread String ConsumeMessageThread_0

线程名称

TrackList List java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)

Jstack 堆栈信息字符串

Language String JAVA

客户端语言

LastTimestamp Long 1570701368114

最后更新时间

MessageModel String CLUSTERING

消费模型,取值说明如下:

CLUSTERING:集群消费模式
BROADCASTING:广播消费模式。

RunningDataList Array

实时状态统计

Diff Long 100

堆积量

FailedCountPerHour Long 0

每小时内消费失败的消息数统计

FailedTps String 0.1

消费消息失败的 TPS 统计

GroupId String 000

订阅方的 Group ID

OkTps String 0.1

消费消息成功的 TPS 统计

Rt String 0.1

消费 RT 时间,单位 ms

Topic String test-mq_topic

订阅的 Topic 名称

StartTimestamp Long 1570701361528

开始时间

SubscriptionSet Array

订阅关系集合

SubString String

订阅该 Topic 的子类别 Tag 表达式

SubVersion Long 1570701364301

订阅关系版本号,为自增 Long 型

TagsSet List

订阅的 Tag 集合

Topic String test-mq_topic

订阅的 Topic 名称

ThreadCount Long 20

消费线程数

Version String V4_3_6

客户端版本号

DelayTime Long 100857

延迟时间

DetailInTopicList Array

各个 Topic 的消费情况

DelayTime Long 0

延迟时间

LastTimestamp Long 1570701259403

最后更新时间

Topic String test-mq_topic

Topic 名称

TotalDiff Long 0

该 Topic 消费总堆积数

InstanceId String MQ_INST_111111111111_DOxxxxxx

实例 ID

LastTimestamp Long 1566883844954

最后更新时间

Online Boolean true

是否在线

RebalanceOk Boolean true

客户端 Rebalance 是否正常。取值说明如下:

true:正常
false:不正常。

SubscriptionSame Boolean true

订阅关系是否一致

TotalDiff Long 197

集群总的消费堆积

RequestId String 861E6630-AEC0-4B2D-B214-6CB5E44B7F04

请求ID

ResultCode String OK

结果码

ResultMessage String OK

结果描述

示例

请求示例

http(s)://[Endpoint]/?Action=GetMqSofamqConsumerStatus&Cell=RZ01A&Detail=true&GroupId=GID_test_group_id&InstanceId=MQ_INST_111111111111_DOxxxxxx&NeedJstack=false&<公共请求参数>

正常返回示例

XML 格式

<RequestId>861E6630-AEC0-4B2D-B214-6CB5E44B7F04</RequestId><Data>    <ConsumerConnectionInfoList>        <ClientAddr>30.5.121.</ClientAddr>        <Language>JAVA</Language>        <RemoteIp>42.120.74.</RemoteIp>        <Version>V4_3_6_SNAPSHOT</Version>        <ClientId>30.5.121.@25560#-1999745829#-1737591554#458773089270275     </ClientId>    </ConsumerConnectionInfoList>    <ConsumerConnectionInfoList>        <MessageModel>CLUSTERING</MessageModel>        <ThreadCount>20</ThreadCount>        <ConsumeType>PUSH</ConsumeType>        <Language>JAVA</Language>        <LastTimestamp>1570701368114</LastTimestamp>        <StartTimestamp>1570701361528</StartTimestamp>        <Version>V4_3_6</Version>        <Connection></Connection>        <ClientId>30.5..@25560#-1999745829#-1737591554#458773089270275</ClientId>    </ConsumerConnectionInfoList>    <ConsumerConnectionInfoList>        <RunningDataList>            <Thread>ConsumeMessageThread_0</Thread>        </RunningDataList>        <RunningDataList>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </RunningDataList>        <RunningDataList>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </RunningDataList>        <RunningDataList>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </RunningDataList>        <RunningDataList>            <TagsSet></TagsSet>        </RunningDataList>        <SubscriptionSet>            <Thread>ConsumeMessageThread_0</Thread>        </SubscriptionSet>        <SubscriptionSet>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </SubscriptionSet>        <SubscriptionSet>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </SubscriptionSet>        <SubscriptionSet>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </SubscriptionSet>        <SubscriptionSet>            <TagsSet></TagsSet>        </SubscriptionSet>        <Jstack>            <Thread>ConsumeMessageThread_0</Thread>        </Jstack>        <Jstack>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </Jstack>        <Jstack>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </Jstack>        <Jstack>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </Jstack>        <Jstack>            <TagsSet></TagsSet>        </Jstack>    </ConsumerConnectionInfoList>    <ConsumerConnectionInfoList>        <LastTimestamp>1570701259403</LastTimestamp>        <TotalDiff>0</TotalDiff>        <DelayTime>0</DelayTime>        <Topic>test-mq_topic</Topic>    </ConsumerConnectionInfoList>    <ConsumeModel>CLUSTERING</ConsumeModel>    <ConsumeTps>0</ConsumeTps>    <LastTimestamp>1566883844954</LastTimestamp>    <InstanceId>MQ_INST_111111111111_DOxxxxxx     </InstanceId>    <RebalanceOk>true</RebalanceOk>    <SubscriptionSame>true</SubscriptionSame>    <TotalDiff>197</TotalDiff>    <DelayTime>100857</DelayTime>    <Online>true</Online>    <ConnectionSet>        <ClientAddr>30.5.121.</ClientAddr>        <Language>JAVA</Language>        <RemoteIp>42.120.74.</RemoteIp>        <Version>V4_3_6_SNAPSHOT</Version>        <ClientId>30.5.121.@25560#-1999745829#-1737591554#458773089270275     </ClientId>    </ConnectionSet>    <ConnectionSet>        <MessageModel>CLUSTERING</MessageModel>        <ThreadCount>20</ThreadCount>        <ConsumeType>PUSH</ConsumeType>        <Language>JAVA</Language>        <LastTimestamp>1570701368114</LastTimestamp>        <StartTimestamp>1570701361528</StartTimestamp>        <Version>V4_3_6</Version>        <Connection></Connection>        <ClientId>30.5..@25560#-1999745829#-1737591554#458773089270275</ClientId>    </ConnectionSet>    <ConnectionSet>        <RunningDataList>            <Thread>ConsumeMessageThread_0</Thread>        </RunningDataList>        <RunningDataList>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </RunningDataList>        <RunningDataList>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </RunningDataList>        <RunningDataList>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </RunningDataList>        <RunningDataList>            <TagsSet></TagsSet>        </RunningDataList>        <SubscriptionSet>            <Thread>ConsumeMessageThread_0</Thread>        </SubscriptionSet>        <SubscriptionSet>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </SubscriptionSet>        <SubscriptionSet>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </SubscriptionSet>        <SubscriptionSet>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </SubscriptionSet>        <SubscriptionSet>            <TagsSet></TagsSet>        </SubscriptionSet>        <Jstack>            <Thread>ConsumeMessageThread_0</Thread>        </Jstack>        <Jstack>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </Jstack>        <Jstack>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </Jstack>        <Jstack>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </Jstack>        <Jstack>            <TagsSet></TagsSet>        </Jstack>    </ConnectionSet>    <ConnectionSet>        <LastTimestamp>1570701259403</LastTimestamp>        <TotalDiff>0</TotalDiff>        <DelayTime>0</DelayTime>        <Topic>test-mq_topic</Topic>    </ConnectionSet>    <DetailInTopicList>        <ClientAddr>30.5.121.</ClientAddr>        <Language>JAVA</Language>        <RemoteIp>42.120.74.</RemoteIp>        <Version>V4_3_6_SNAPSHOT</Version>        <ClientId>30.5.121.@25560#-1999745829#-1737591554#458773089270275     </ClientId>    </DetailInTopicList>    <DetailInTopicList>        <MessageModel>CLUSTERING</MessageModel>        <ThreadCount>20</ThreadCount>        <ConsumeType>PUSH</ConsumeType>        <Language>JAVA</Language>        <LastTimestamp>1570701368114</LastTimestamp>        <StartTimestamp>1570701361528</StartTimestamp>        <Version>V4_3_6</Version>        <Connection></Connection>        <ClientId>30.5..@25560#-1999745829#-1737591554#458773089270275</ClientId>    </DetailInTopicList>    <DetailInTopicList>        <RunningDataList>            <Thread>ConsumeMessageThread_0</Thread>        </RunningDataList>        <RunningDataList>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </RunningDataList>        <RunningDataList>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </RunningDataList>        <RunningDataList>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </RunningDataList>        <RunningDataList>            <TagsSet></TagsSet>        </RunningDataList>        <SubscriptionSet>            <Thread>ConsumeMessageThread_0</Thread>        </SubscriptionSet>        <SubscriptionSet>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </SubscriptionSet>        <SubscriptionSet>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </SubscriptionSet>        <SubscriptionSet>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </SubscriptionSet>        <SubscriptionSet>            <TagsSet></TagsSet>        </SubscriptionSet>        <Jstack>            <Thread>ConsumeMessageThread_0</Thread>        </Jstack>        <Jstack>            <TrackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</TrackList>        </Jstack>        <Jstack>            <OkTps>0.1</OkTps>            <Rt>0.1</Rt>            <Diff>100</Diff>            <FailedTps>0.1</FailedTps>            <Topic>test-mq_topic</Topic>            <FailedCountPerHour>0</FailedCountPerHour>            <GroupId>000</GroupId>        </Jstack>        <Jstack>            <SubString></SubString>            <Topic>test-mq_topic</Topic>            <SubVersion>1570701364301</SubVersion>        </Jstack>        <Jstack>            <TagsSet></TagsSet>        </Jstack>    </DetailInTopicList>    <DetailInTopicList>        <LastTimestamp>1570701259403</LastTimestamp>        <TotalDiff>0</TotalDiff>        <DelayTime>0</DelayTime>        <Topic>test-mq_topic</Topic>    </DetailInTopicList></Data><ResultMessage>OK</ResultMessage><ResultCode>OK</ResultCode>

JSON 格式

{“RequestId”:”861E6630-AEC0-4B2D-B214-6CB5E44B7F04”,”Data”:{“ConsumerConnectionInfoList”:[{“ClientAddr”:”30.5.121.“,”Language”:”JAVA”,”RemoteIp”:”42.120.74.“,”Version”:”V4_3_6_SNAPSHOT”,”ClientId”:”30.5.121.@25560#-1999745829#-1737591554#458773089270275\t “},{“MessageModel”:”CLUSTERING”,”ThreadCount”:”20”,”ConsumeType”:”PUSH”,”Language”:”JAVA”,”LastTimestamp”:”1570701368114”,”StartTimestamp”:”1570701361528”,”Version”:”V4_3_6”,”Connection”:”“,”ClientId”:”30.5..@25560#-1999745829#-1737591554#458773089270275”},{“RunningDataList”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}],”SubscriptionSet”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}],”Jstack”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}]},{“LastTimestamp”:”1570701259403”,”TotalDiff”:”0”,”DelayTime”:”0”,”Topic”:”test-mq_topic”}],”ConsumeModel”:”CLUSTERING”,”ConsumeTps”:”0”,”LastTimestamp”:”1566883844954”,”InstanceId”:”MQ_INST_111111111111_DOxxxxxx\t “,”RebalanceOk”:”true”,”SubscriptionSame”:”true”,”TotalDiff”:”197”,”DelayTime”:”100857”,”Online”:”true”,”ConnectionSet”:[{“ClientAddr”:”30.5.121.“,”Language”:”JAVA”,”RemoteIp”:”42.120.74.“,”Version”:”V4_3_6_SNAPSHOT”,”ClientId”:”30.5.121.@25560#-1999745829#-1737591554#458773089270275\t “},{“MessageModel”:”CLUSTERING”,”ThreadCount”:”20”,”ConsumeType”:”PUSH”,”Language”:”JAVA”,”LastTimestamp”:”1570701368114”,”StartTimestamp”:”1570701361528”,”Version”:”V4_3_6”,”Connection”:”“,”ClientId”:”30.5..@25560#-1999745829#-1737591554#458773089270275”},{“RunningDataList”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}],”SubscriptionSet”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}],”Jstack”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}]},{“LastTimestamp”:”1570701259403”,”TotalDiff”:”0”,”DelayTime”:”0”,”Topic”:”test-mq_topic”}],”DetailInTopicList”:[{“ClientAddr”:”30.5.121.“,”Language”:”JAVA”,”RemoteIp”:”42.120.74.“,”Version”:”V4_3_6_SNAPSHOT”,”ClientId”:”30.5.121.@25560#-1999745829#-1737591554#458773089270275\t “},{“MessageModel”:”CLUSTERING”,”ThreadCount”:”20”,”ConsumeType”:”PUSH”,”Language”:”JAVA”,”LastTimestamp”:”1570701368114”,”StartTimestamp”:”1570701361528”,”Version”:”V4_3_6”,”Connection”:”“,”ClientId”:”30.5..@25560#-1999745829#-1737591554#458773089270275”},{“RunningDataList”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}],”SubscriptionSet”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}],”Jstack”:[{“Thread”:”ConsumeMessageThread_0”},{“TrackList”:”java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)”},{“OkTps”:”0.1”,”Rt”:”0.1”,”Diff”:”100”,”FailedTps”:”0.1”,”Topic”:”test-mq_topic”,”FailedCountPerHour”:”0”,”GroupId”:”000”},{“SubString”:”“,”Topic”:”test-mq_topic”,”SubVersion”:”1570701364301”},{“TagsSet”:”“}]},{“LastTimestamp”:”1570701259403”,”TotalDiff”:”0”,”DelayTime”:”0”,”Topic”:”test-mq_topic”}]},”ResultMessage”:”OK”,”ResultCode”:”OK”}

错误码

访问错误中心查看更多错误码。

     </article>
  </main>