获取 Kafka 消费组信息-DescribeUKafkaConsumer

获取 Kafka 消费组信息

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
Zonestring可用区。参见 可用区列表Yes
ProjectIdstring项目 ID。不填写为默认项目,子帐号必须填写。 请参考 GetProjectList 接口No
ClusterInstanceIdstringKafka 集群 IDYes
ConsumerGroupstring消费组组名Yes
Typestring消费者组类型(同消费者组列表返回的类型值)Yes

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
GroupNamestring消费者组组名No
Typestring消费者组类型No
Topicsstring消费者组所订阅 topic 信息No

Request Example

https://api.ucloud.cn/?Action=DescribeUKafkaConsumer
&Region=cn-bj2
&Zone=cn-bj2-02
&ProjectId=KQFUAJET
&ClusterInstanceId=ukafka-asje3q
&ConsumerGroup=group1
&Type=ZK

Response Example

{
    "RetCode": 0,
    "Action": "DescribeUKafkaConsumerResponse",
    "GroupName": "group1",
    "Type": "ZK",
    "Topics": {
        "foo": {
            "TotalLag": 63,
            "Partitions": {
                "0": {
                    "CurrentOffset": 1534824,
                    "Consumer": "group1_ukafka-asje3q-kafka2-1538033810949-626a2e06-0",
                    "LogEndOffset": 1534867,
                    "Lag": 43
                },
                "1": {
                    "CurrentOffset": 1534519,
                    "Consumer": "group1_ukafka-asje3q-kafka2-1538101885995-a9d3def3-0",
                    "LogEndOffset": 1534529,
                    "Lag": 10
                },
                "2": {
                    "CurrentOffset": 1535549,
                    "Consumer": "group1_ukafka-asje3q-kafka2-1538101889777-b0fb1091-0",
                    "LogEndOffset": 1535559,
                    "Lag": 10
                }
            },
            "LogPer": 0.000013680915448685166,
            "PartitionAssignedPer": 1,
            "LastUpdateTime": 1538194238000
        },
        "bar": {
            "TotalLag": 837280,
            "Partitions": {
                "0": {
                    "CurrentOffset": 2009411,
                    "LogEndOffset": 2846691,
                    "Consumer": "",
                    "Lag": 837280
                }
            },
            "LagPer": 0.2941239495259584,
            "PartitionAssignedPer": 0,
            "LastUpdateTime": 1538194238000
        }
    }
}