You need to enable JavaScript to run this app.
文档中心
消息队列 Kafka版

消息队列 Kafka版

复制全文
下载 pdf
Group 管理
DescribeConsumedPartitions - 查看 Group 订阅的分区
复制全文
下载 pdf
DescribeConsumedPartitions - 查看 Group 订阅的分区
调用 DescribeConsumedPartitions 接口查看消费组订阅的指定 Topic 的分区信息。​
使用说明​
此接口用于查看消费组订阅的指定 Topic 中每个分区的基本信息,包括分区的编号、消费者、消费进度等。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeConsumedPartitions​
要执行的操作,取值:DescribeConsumedPartitions。​
​
Version string 必选 示例值:2022-05-01​
API的版本,取值:2022-05-01。​
​
InstanceId string 必选 示例值:kafka-cnngbnntswg1****​
实例 ID。​
​
GroupId string 必选 示例值:my_group​
消费组 ID。​
​
TopicName string 必选 示例值:my_topic​
Topic 名称。​
​
PageNumber integer 必选 示例值:1​
列表的页码,最小值为 1。​
​
PageSize integer 必选 示例值:1​
列表中每一页的条目数量,取值范围为 1~100。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
Total integer 示例值:12​
消费组消费对应 Topic 的分区总数。​
​
ConsumedPartitionsInfo object[] 示例值:--​
指定 Topic 的分区列表。​
Accumulation long 示例值:15219375​
消费组在分区上的消息堆积量。​
​
PartitionId integer 示例值:0​
Topic 分区编号。​
​
ConsumedClient string 示例值:consumer-1/192.168.xxx.xx​
分区消费者的信息,由客户端消费时指定,此处可能为空。​
​
ConsumedOffset long `示例值:2662697877​
`​
分区消费进度​
​
StartOffset long 示例值:2661451497​
分区最早的消息偏移量。​
​
EndOffset long 示例值:2677917252​
分区下一条消息的偏移量。​
​
​
​
​
请求示例​
​
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": 20,​
"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": 14840853,​
"ConsumedClient": "consumer-1/192.168.xxx.xx",​
"ConsumedOffset": 5384490996,​
"EndOffset": 5399331849,​
"PartitionId": 11,​
"StartOffset": 5383905142​
}​
],​
"Total": 12​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter​
The specified parameter is not valid.​
参数值无效。​
403​
OperationDenied.AccountNotAuthorized​
You are not authorized to perform this operation.​
您不具备相关权限 ,请授权或切换账号后重试。​
403​
OperationDenied.InvalidInstanceStatus​
The operation is not valid for the current status of the instance.​
当前实例状态不允许执行该操作。​
404​
InvalidInstanceId.NotFound​
The specified Instance ID does not exist.​
实例不存在。​
404​
InvalidGroupId.NotFound​
The specified consumer group does not exist.​
Group 不存在。​
404​
InvalidTopicName.NotFound​
The specified topic does not exist.​
Topic 不存在。​
500​
InternalError​
The request failed due to some unknown error, exception or failure.​
内部错误,请稍后重试。​
​
​
最近更新时间:2025.08.08 17:47:28
这个页面对您有帮助吗?
有用
有用
无用
无用