All Products
Search
Document Center

:GetConsumerGroupLag

Last Updated:Nov 28, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Query Consumer Group Backlog Information

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rocketmq:GetConsumerGroupLagget
*ConsumerGroup
acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}/consumergroup/{#ConsumerGroupId}
    none
none

Request syntax

GET /instances/{instanceId}/consumerGroups/{consumerGroupId}/lag HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

rmq-cn-2r42vrvde0j
consumerGroupIdstringYes

The consumer Group ID.

CID-TEST

Response parameters

ParameterTypeDescriptionExample
object

Result

requestIdstring

The request ID.

F5764C40-FB8C-53AE-B95D-96AB3D0E9375
successboolean

Indicates whether the request was successful.

true
dataobject

The returned data.

regionIdstring

Region ID

cn-hangzhou
instanceIdstring

Instance ID

rmq-cn-7e22ody****
consumerGroupIdstring

Consumer Group ID

CID-TEST
totalLagobject

Total lag count

readyCountlong

Ready message count

1
inflightCountlong

The number of messages being consumed.

1
deliveryDurationlong

Delivery delay time, in seconds

12
topicLagMapobject

Backlog for each topic

object

Total message count

readyCountlong

Ready message count

1
inflightCountlong

The number of messages being consumed.

1
deliveryDurationlong

Delivery delay time, in seconds

12
codestring

Error code

Topic.NotFound
messagestring

Error message

Parameter instanceId is mandatory for this action .
httpStatusCodeinteger

HTTP status code

200
dynamicCodestring

Dynamic error code

InstanceId
dynamicMessagestring

The dynamic error message.

instanceId

Examples

Sample success responses

JSONformat

{
  "requestId": "F5764C40-FB8C-53AE-B95D-96AB3D0E9375",
  "success": true,
  "data": {
    "regionId": "cn-hangzhou",
    "instanceId": "rmq-cn-7e22ody****",
    "consumerGroupId": "CID-TEST",
    "totalLag": {
      "readyCount": 1,
      "inflightCount": 1,
      "deliveryDuration": 12
    },
    "topicLagMap": {
      "key": {
        "readyCount": 1,
        "inflightCount": 1,
        "deliveryDuration": 12
      }
    }
  },
  "code": "Topic.NotFound",
  "message": "Parameter instanceId is mandatory for this action .",
  "httpStatusCode": 200,
  "dynamicCode": "InstanceId",
  "dynamicMessage": "instanceId"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-26The response structure of the API has changedView Change Details