API Introduction
Used to query the details of a subscription group.
API Restrictions
None.
URl
GET https://[endpoint]/v2/consumer/status
Request Parameters
Request Parameters | Required or Not | Position | Parameter Type | Description |
prodInstId | Yes | url | String | Instance ID |
group | Yes | url | String | Subscription Group Name |
clientId | Yes | url | String | Client ID |
Response Parameter
Response Parameter | Parameter Type | Description |
statusCode | String | The status code of the interface on the system layer. Success: 800; failure: 900. |
message | String | Status Description |
returnObj | String | Return the object. The parameters included in this parameter are described in the comments in Response Examples. |
Description of Return Value returnObj
Response Parameter | Parameter Type | Description |
data | Json | Consumer Details |
Description of Return Value data
Response Parameter | Parameter Type | Description |
properties | Properties | Subscription Group Properties |
subscriptionSet | TreeSet<SubscriptionData> | Subscription Group Data |
mqTable | TreeMap<MessageQueue, ProcessQueueVo> | Queue Information |
statusTable | TreeMap<String, ConsumeStatusVo> | Consumption Status Info |
Description of Return Value subscriptionSet
Response Parameter | Parameter Type | Description |
topic | String | Topic |
subString | String | Subscription String |
tagsSet | List | Tag List |
codeSet | List | Code List |
Description of Return Value MessageQueue
Response Parameter | Parameter Type | Description |
topic | String | Topic |
brokerName | String | Broker name |
queueId | Integer | Queue ID |
Description of Return Value ConsumeStatusVo
Response Parameter | Parameter Type | Description |
commitOffset | Long | Physical Offset |
lastPullTimestamp | String | Broker name |
lastConsumeTimestamp | Integer | Queue ID |
Description of Return Value ProcessQueueVo
Response Parameter | Parameter Type | Description |
pullRT | Double | Time required to pull a message (ms) |
pullTPS | Double | Message pull TPS |
consumeRT | Double | Consumption time (ms) |
consumeOKTPS | Double | Consumption success TPS |
consumeFailedTPS | Double | Consumption failure TPS |
consumeFailedMsgs | Number of messages that failed to be consumed |
Sample Request
GET https://[endpoint]/v2/consumer/status?prodInstId=70687660456281088&groupName=group&clientId=5.5.148.141@test_instance
Examples of a Successful Response
{
"returnObj":{
"data":{
"properties":{
"maxReconsumeTimes":"-1",
"adjustThreadPoolNumsThreshold":"100000",
"unitMode":"false",
"consumeTimeoutInSec":"-1",
"timeoutStrategy":"ALARM_AND_RETRY",
"consumerGroup":"group",
"messageModel":"CLUSTERING",
"allocateMessageQueueStrategy":"org.apache.rocketmq.client.consumer.rebalance.AllocateMessageQueueAveragely@14978a04",
"pullThresholdSizeForTopic":"-1",
"suspendCurrentQueueTimeMillis":"1000",
"pullThresholdSizeForQueue":"100",
"PROP_CLIENT_VERSION":"V2_8_3_CTG",
"offsetStore":"org.apache.rocketmq.client.consumer.store.RemoteBrokerOffsetStore@64668c91",
"consumeConcurrentlyMaxSpan":"2000",
"postSubscriptionWhenPull":"false",
"consumeTimestamp":"20220831110532",
"PROP_CONSUME_TYPE":"CONSUME_PASSIVELY",
"consumeMessageBatchMaxSize":"1",
"defaultMQPushConsumerImpl":"org.apache.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl@6470d9c8",
"PROP_THREADPOOL_CORE_SIZE":"20",
"pullInterval":"0",
"pullThresholdForQueue":"1000",
"pullThresholdForTopic":"-1",
"consumeFromWhere":"CONSUME_FROM_FIRST_OFFSET",
"PROP_NAMESERVER_ADDR":"192.168.71.188:8411;",
"pullBatchSize":"32",
"consumeThreadMin":"20",
"PROP_CONSUMER_START_TIMESTAMP":"1661916932150",
"consumeThreadMax":"64",
"consumeTimeout2":"15",
"subscription":"{}",
"PROP_CONSUMEORDERLY":"false",
"messageListener":"com.ctg.mq.api.impl.MQConsumerImpl$ConsumerTopicListenerImpl@677658a0"
},
"subscriptionSet":[
{
"classFilterMode":false,
"topic":"%RETRY%group",
"subString":"*",
"tagsSet":[
],
"codeSet":[
],
"subVersion":1661916951262,
"expressionType":null,
"filterClassSource":null
},
{
"classFilterMode":false,
"topic":"test",
"subString":"*",
"tagsSet":[
],
"codeSet":[
],
"subVersion":1661916951326,
"expressionType":null,
"filterClassSource":null
}
],
"mqTable":{
"MessageQueue [topic=%RETRY%group, brokerName=mq_test_broker_1, queueId=0]":{
"commitOffset":0,
"cachedMsgMinOffset":0,
"cachedMsgMaxOffset":0,
"cachedMsgCount":0,
"cachedMsgSizeInMiB":0,
"transactionMsgMinOffset":0,
"transactionMsgMaxOffset":0,
"transactionMsgCount":0,
"locked":false,
"tryUnlockTimes":0,
"lastLockTimestamp":1661916951245,
"droped":false,
"lastPullTimestamp":1661929387746,
"lastConsumeTimestamp":1661916951245
},
"MessageQueue [topic=test, brokerName=mq_test_broker_1, queueId=0]":{
"commitOffset":6,
"cachedMsgMinOffset":0,
"cachedMsgMaxOffset":0,
"cachedMsgCount":0,
"cachedMsgSizeInMiB":0,
"transactionMsgMinOffset":0,
"transactionMsgMaxOffset":0,
"transactionMsgCount":0,
"locked":false,
"tryUnlockTimes":0,
"lastLockTimestamp":1661916951284,
"droped":false,
"lastPullTimestamp":1661929388688,
"lastConsumeTimestamp":1661916951284
},
"MessageQueue [topic=test, brokerName=mq_test_broker_1, queueId=1]":{
"commitOffset":6,
"cachedMsgMinOffset":0,
"cachedMsgMaxOffset":0,
"cachedMsgCount":0,
"cachedMsgSizeInMiB":0,
"transactionMsgMinOffset":0,
"transactionMsgMaxOffset":0,
"transactionMsgCount":0,
"locked":false,
"tryUnlockTimes":0,
"lastLockTimestamp":1661916951307,
"droped":false,
"lastPullTimestamp":1661929388580,
"lastConsumeTimestamp":1661916951307
},
"MessageQueue [topic=test, brokerName=mq_test_broker_1, queueId=2]":{
"commitOffset":7,
"cachedMsgMinOffset":0,
"cachedMsgMaxOffset":0,
"cachedMsgCount":0,
"cachedMsgSizeInMiB":0,
"transactionMsgMinOffset":0,
"transactionMsgMaxOffset":0,
"transactionMsgCount":0,
"locked":false,
"tryUnlockTimes":0,
"lastLockTimestamp":1661916951295,
"droped":false,
"lastPullTimestamp":1661929388691,
"lastConsumeTimestamp":1661916951295
},
"MessageQueue [topic=test, brokerName=mq_test_broker_1, queueId=3]":{
"commitOffset":8,
"cachedMsgMinOffset":0,
"cachedMsgMaxOffset":0,
"cachedMsgCount":0,
"cachedMsgSizeInMiB":0,
"transactionMsgMinOffset":0,
"transactionMsgMaxOffset":0,
"transactionMsgCount":0,
"locked":false,
"tryUnlockTimes":0,
"lastLockTimestamp":1661916951317,
"droped":false,
"lastPullTimestamp":1661929388688,
"lastConsumeTimestamp":1661916951317
}
},
"statusTable":{
"%RETRY%group":{
"pullRT":0,
"pullTPS":0,
"consumeRT":0,
"consumeOKTPS":0,
"consumeFailedTPS":0,
"consumeFailedMsgs":0
},
"test":{
"pullRT":0,
"pullTPS":0,
"consumeRT":0,
"consumeOKTPS":0,
"consumeFailedTPS":0,
"consumeFailedMsgs":0
}
},
"jstack":null
}
},
"message":"success",
"statusCode":800
}
Example of a Failed Response
{
"returnObj": {},
"message": "...",
"statusCode": "900"
}