You need to enable JavaScript to run this app.
导航

DescribeConsumedTopics

最近更新时间2023.02.27 18:04:23

首次发布时间2022.04.24 15:56:38

调用 DescribeConsumedTopics 接口查看消费组订阅的 Topic 名称。

使用说明

  • 此接口的 API Version 为 2018-01-01
  • 此接口的调用频率限制为 100 次/s,超出频率限制会报错 “AccountFlowLimitExceeded”。

请求参数

参数

参数类型

是否必选

示例值

说明

InstanceId

String

必选

kafka-****x

查询消费组所属的实例 ID。

GroupId

String

必选

test_grooup

需要查询的消费组 ID。

PageNumber

Integer

必选

1

查询消费组的页码。不小于 1。

PageSize

Integer

必选

10

查询消费组单页的个数。

FiledName

String

可选

test_grooup

排序使用的字段。

  • PartitionNumber:(默认)按照分区编号排序。
  • Accumulation:按照消费堆积量排序。

SortOrder

String

可选

Asc

排序方式,可设置为:

  • Desc:降序
  • Asc:升序

Search

String

可选

test_topic

根据此参数指定的 Topic 名称进行筛选,支持模糊匹配。

响应参数

参数

参数类型

说明

Total

Integer

指定消费组消费的总 Topic 数量。

Accumulation

Integer

指定消费组堆积的总消息数。

Topics

List

符合查询条件的 Topic 列表。详细说明请参考 ConsumedTopic

示例

请求示例

POST https://kafka.volcengineapi.com/?Action=DescribeConsumedTopics&Version=2018-01-01 HTTP/1.1
Accept: application/json
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=********

{
  "PageNumber": 1,
  "PageSize": 10,
  "InstanceId": "kafka-****x",
  "GroupId": "my_grooup",
  "FiledName": "my_grooup",
  "SortOrder": "Asc",
  "Search": "my_topic"
}

响应示例

{
  "ResponseMetadata": {
    "RequestId": "****************",
    "Action": "DescribeConsumedTopics",
    "Version": "2018-01-01",
    "Service": "kafka",
    "Region": "cn-beijing"
  },
  "Result": {
    "Total": 0,
    "Accumulation": 0,
    "Topics": [
      {
        "TopicName": "",
        "Accumulation": 0
      }
    ]
  }
}