最近更新时间:2023.03.30 19:59:26
首次发布时间:2023.03.30 19:59:26
调用 DescribeConsumedPartitions 接口查看消费组订阅的指定 Topic 的分区信息。
此接口用于查看消费组订阅的指定 Topic 中每个分区的基本信息,包括分区的编号、消费者、消费进度等。
参数 | 参数类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
InstanceId | String | 是 | kafka-cnngbnntswg1****x | 实例 ID。 |
GroupId | String | 是 | my_group | 消费组 ID。 |
TopicName | String | 是 | my_topic | Topic 名称。 |
PageNumber | Integer | 是 | 1 | 列表的页码,最小值为 1。 |
PageSize | Integer | 是 | 10 | 列表中每一页的条目数量,取值范围为 1~100。 |
参数 | 参数类型 | 示例值 | 说明 |
---|---|---|---|
Total | Integer | 12 | 消费组消费对应Topic的分区总数。 |
ConsumedPartitionsInfo | Array of ConsumedPartitionInfoObject | / | 指定 Topic 的分区列表。详细说明请参考数据结构中的 ConsumedPartition 部分。 |
POST /?Action=DescribeConsumedPartitions&Version=2022-05-01 HTTP/1.1 Content-Type: application/json Host: kafka.volcengineapi.com X-Date: 20210328T100802Z Authorization: HMAC-SHA256 Credential=AK********/20210328/cn-beijing/kafka/request, SignedHeaders=x-date, Signature=******** { "InstanceId": "kafka-cnng1si21igu****", "PageNumber": 1, "PageSize": 2, "GroupId":"Group", "TopicName": "test" }
{ "ResponseMetadata": { "RequestId": "20230321113657C9E60632E1D4F61E5BC5", "Action": "DescribeConsumedPartitions", "Version": "2022-05-01", "Service": "Kafka", "Region": "cn-beijing" }, "Result": { "ConsumedPartitionsInfo": [ { "Accumulation": 14733811, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384592589, "EndOffset": 5399326400, "PartitionId": 0, "StartOffset": 5383336144 }, { "Accumulation": 15163307, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384167585, "EndOffset": 5399330892, "PartitionId": 1, "StartOffset": 5382017470 }, { "Accumulation": 14945858, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384386022, "EndOffset": 5399331880, "PartitionId": 2, "StartOffset": 5383799213 }, { "Accumulation": 14752456, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384573944, "EndOffset": 5399326400, "PartitionId": 3, "StartOffset": 5382346474 }, { "Accumulation": 15178847, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384152047, "EndOffset": 5399330894, "PartitionId": 4, "StartOffset": 5382000957 }, { "Accumulation": 14911104, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384420776, "EndOffset": 5399331880, "PartitionId": 5, "StartOffset": 5383833998 }, { "Accumulation": 14781616, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384544785, "EndOffset": 5399326401, "PartitionId": 6, "StartOffset": 5382317345 }, { "Accumulation": 15144197, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384186697, "EndOffset": 5399330894, "PartitionId": 7, "StartOffset": 5382036612 }, { "Accumulation": 14878307, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384453542, "EndOffset": 5399331849, "PartitionId": 8, "StartOffset": 5383866727 }, { "Accumulation": 14735190, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384591180, "EndOffset": 5399326370, "PartitionId": 9, "StartOffset": 5382361670 }, { "Accumulation": 15142067, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384188794, "EndOffset": 5399330861, "PartitionId": 10, "StartOffset": 5382038679 }, { "Accumulation": 14840853, "ConsumedClient": "consumer-1/192.168.xxx.xx", "ConsumedOffset": 5384490996, "EndOffset": 5399331849, "PartitionId": 11, "StartOffset": 5383905142 } ], "Total": 12 } }