All Products
Search
Document Center

Message Queue for Apache Kafka:GetConsumerProgress

Last Updated:Nov 18, 2022

Queries the consumption status of a specified consumer group.

Authorization information

There is currently no authorization information disclosed in the API.

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 HTTP status code returned. The HTTP status code 200 indicates that the request is successful.

200
Messagestring

The returned message.

operation success.
RequestIdstring

The ID of the request.

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

Indicates whether the request is successful.

true
ConsumerProgressobject

The consumption status of the consumer group.

LastTimestamplong

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

1566874931671
TotalDifflong

The number of messages that were not consumed in all topics. This is also known as the number of accumulated messages in all topics.

0
TopicListarray

The consumption progress of each topic to which the consumer group is subscribed.

object
TotalDifflong

The number of messages that were not consumed in the topic. This is also known as the number of accumulated messages in the topic.

0
LastTimestamplong

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

1566874931649
Topicstring

The name of the topic.

kafka-test
OffsetListarray

The information about offsets in the topic.

object
Partitioninteger

The ID of the partition.

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

Example

Normal return example

JSONFormat

{
  "Code": 200,
  "Message": "operation success.",
  "RequestId": "252820E1-A2E6-45F2-B4C9-1056B8CE****",
  "Success": true,
  "ConsumerProgress": {
    "LastTimestamp": 1566874931671,
    "TotalDiff": 0,
    "TopicList": [
      {
        "TotalDiff": 0,
        "LastTimestamp": 1566874931649,
        "Topic": "kafka-test",
        "OffsetList": [
          {
            "Partition": 0,
            "BrokerOffset": 9,
            "ConsumerOffset": 9,
            "LastTimestamp": 1566874931649
          }
        ]
      }
    ]
  }
}

Error codes

For a list of error codes, visit the API error center.