All Products
Search
Document Center

ApsaraMQ for Kafka:GetConsumerProgress

Last Updated:Apr 12, 2024

Queries the consumer progress of a consumer group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
alikafka:ListGroupRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

alikafka_pre-cn-mp919o4v****
ConsumerIdstringYes

The name of the consumer group.

kafka-test
RegionIdstringYes

The region ID of the instance.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The returned HTTP status code. If the request is successful, 200 is returned.

200
Messagestring

The returned message.

operation success.
RequestIdstring

The request ID.

252820E1-A2E6-45F2-B4C9-1056B8CE****
Successboolean

Indicates whether the request is successful.

true
ConsumerProgressobject

The consumer progress of the consumer group.

LastTimestamplong

The time when the last message consumed by the consumer group was generated.

1566874931671
TotalDifflong

The total number of unconsumed messages in all topics to which the consumer group subscribes.

0
TopicListobject []

The consumer progress of each topic to which the consumer group subscribes.

TotalDifflong

The number of unconsumed messages in the topic to which the consumer group subscribes.

0
LastTimestamplong

The time when the last consumed message in the topic was generated.

1566874931649
Topicstring

The topic name.

kafka-test
OffsetListobject []

The consumer offsets.

Partitioninteger

The partition ID.

0
BrokerOffsetlong

The latest offset in the partition of the topic.

9
ConsumerOffsetlong

The consumer offset in the partition of the topic.

9
LastTimestamplong

The time when the last consumed message in the partition was generated.

1566874931649
RebalanceInfoListobject []

The details of rebalances in the consumer group.

Generationlong

The number of rebalances.

100
LastRebalanceTimestamplong

The time when the last rebalance occurred. Unit: milliseconds.

1709199270
Reasonstring

The cause of the rebalance.

removing member consumer-1-cd14eb9c-379b-4b8e-9bbd-76f147f8536f on LeaveGroup
GroupIdstring

The group ID of the subscriber.

falcon-uat
RebalanceTimeConsuminglong

The duration of the rebalance. Unit: milliseconds.

1
RebalanceSuccessboolean

Indicates whether new members are added to the consumer group in the rebalance.

true

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "operation success.",
  "RequestId": "252820E1-A2E6-45F2-B4C9-1056B8CE****",
  "Success": true,
  "ConsumerProgress": {
    "LastTimestamp": 1566874931671,
    "TotalDiff": 0,
    "TopicList": {
      "TopicList": [
        {
          "TotalDiff": 0,
          "LastTimestamp": 1566874931649,
          "Topic": "kafka-test",
          "OffsetList": {
            "OffsetList": [
              {
                "Partition": 0,
                "BrokerOffset": 9,
                "ConsumerOffset": 9,
                "LastTimestamp": 1566874931649
              }
            ]
          }
        }
      ]
    },
    "RebalanceInfoList": {
      "RebalanceInfoList": [
        {
          "Generation": 100,
          "LastRebalanceTimestamp": 1709199270,
          "Reason": "removing member consumer-1-cd14eb9c-379b-4b8e-9bbd-76f147f8536f on LeaveGroup",
          "GroupId": "falcon-uat",
          "RebalanceTimeConsuming": 1,
          "RebalanceSuccess": true
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Sls.Query.ErrorData query failed. Please try again later.Data query failed. Please try again later.
400AgentErrorA system exception occurred. Please submit a ticket.A system exception occurred. Please submit a ticket.
400AgentBusinessErrorInternal error, please try again, if invalid, please submit the work order.Internal error, please try again, if invalid, please submit the work order.
400InvalidParameterThe %s parameter is invalid.-
404InstanceAgent.NotFoundInstance does not exist. Please check the entry and try again.Instance does not exist. Please check the entry and try again.
404InvalidParameter.DataNotFoundNo data found for the %s parameter.-

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

Change history

Change timeSummary of changesOperation
2024-04-02The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
    Added Error Codes: 404
Output ParametersThe response structure of the API has changed.