Kafka实例查询Topic
功能介绍
该接口用于查询指定Kafka实例的Topic详情。
请求消息
请求参数
无。
请求示例
GET https://{dms_endpoint}/v1.0/{project_id}/instances/{instance_id}/topics 响应消息
响应参数
参数说明见表2。
| 参数 | 类型 | 说明 |
|---|---|---|
| total | Integer | topic总数。 |
| size | Integer | 分页查询的大小。 |
| remain_partitions | Integer | 剩余分区数。 |
| max_partitions | Integer | 分区总数。 |
| topics | Array | Topic列表。 |
| 参数 | 类型 | 说明 |
|---|---|---|
| policiesOnly | Boolean | 是否为默认策略。 |
| id | String | Topic名称 |
| replication | Integer | 副本数,配置数据的可靠性 |
| partition | Integer | Topic分区数,设置消费的并发数。 |
| retention_time | Integer | 消息老化时间。 |
| sync_replication | Boolean | 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效。 默认关闭。 |
| sync_message_flush | Boolean | 是否使用同步落盘。同步落盘会导致性能降低。 |
| external_configs | Object | 扩展配置。 |
| topic_type | Integer | Topic类型。 |
响应示例
{
"count": 1,
"topics": [
{
"id": "topic-test",
"replication": 3,
"partition": 4,
"retention_time": 72,
"sync_replication": "false",
"sync_message_flush": "false"
}
]
}
