1. 接口描述
接口请求域名: tdmq.tencentcloudapi.com 。
获取生产者列表,仅显示在线的生产者
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeProducers。 |
Version | 是 | String | 公共参数,本接口取值:2020-02-17。 |
Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
EnvironmentId | 是 | String | 环境(命名空间)名称。 |
TopicName | 是 | String | 主题名。 |
Offset | 否 | Integer | 起始下标,不填默认为0。 |
Limit | 否 | Integer | 返回数量,不填则默认为10,最大值为20。 |
ProducerName | 否 | String | 生产者名称,模糊匹配。 |
ClusterId | 否 | String | Pulsar 集群的ID |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
ProducerSets | Array of Producer | 生产者集合数组。 |
TotalCount | Integer | 记录总数。 |
RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 获取生产者列表
输入示例
https://tdmq.tencentcloudapi.com/?Action=DescribeProducers
&EnvironmentId=default
&TopicName=U_TOPIC_nfa_game_push_retry_kb
&Offset=0
&Limit=10
&<公共请求参数>
输出示例
{
"Response": {
"TotalCount": 1,
"ProducerSets": [
{
"EnvironmentId": "default",
"TopicName": "U_TOPIC_nfa_game_push_retry_kb",
"CountConnect": 6,
"ConnectionSets": [
{
"Address": "127.0.0.1:41062",
"Partitions": 1,
"ClientVersion": "",
"ProducerName": "sandbox-cluster-1-119-53_sandbox-cluster-1-120-1347_sandbox-cluster-1-121-34_sandbox-cluster-1-122-54",
"ProducerId": "5",
"AverageMsgSize": "0.0",
"MsgThroughputIn": "0.0"
},
{
"Address": "127.0.0.1:41062",
"Partitions": 0,
"ClientVersion": "",
"ProducerName": "sandbox-cluster-1-119-54_sandbox-cluster-1-120-1296_sandbox-cluster-1-121-24_sandbox-cluster-1-122-55",
"ProducerId": "8",
"AverageMsgSize": "0.0",
"MsgThroughputIn": "0.0"
},
{
"Address": "127.0.0.1:41062",
"Partitions": 5,
"ClientVersion": "",
"ProducerName": "sandbox-cluster-1-120-61_sandbox-cluster-1-120-1373_sandbox-cluster-1-121-0_sandbox-cluster-1-122-50",
"ProducerId": "2",
"AverageMsgSize": "0.0",
"MsgThroughputIn": "0.0"
},
{
"Address": "127.0.0.1:41062",
"Partitions": 3,
"ClientVersion": "",
"ProducerName": "sandbox-cluster-1-120-62_sandbox-cluster-1-120-1324_sandbox-cluster-1-121-27_sandbox-cluster-1-122-49",
"ProducerId": "4",
"AverageMsgSize": "0.0",
"MsgThroughputIn": "0.0"
},
{
"Address": "127.0.0.1:41062",
"Partitions": 7,
"ClientVersion": "",
"ProducerName": "sandbox-cluster-1-120-63_sandbox-cluster-1-120-1371_sandbox-cluster-1-121-23_sandbox-cluster-1-122-41",
"ProducerId": "1",
"AverageMsgSize": "0.0",
"MsgThroughputIn": "0.0"
},
{
"Address": "127.0.0.1:41062",
"Partitions": 6,
"ClientVersion": "",
"ProducerName": "sandbox-cluster-1-120-64_sandbox-cluster-1-120-1321_sandbox-cluster-1-121-65_sandbox-cluster-1-122-45",
"ProducerId": "6",
"AverageMsgSize": "0.0",
"MsgThroughputIn": "0.0"
}
]
}
],
"RequestId": "21120f4e-9073-4c08-af19-0886accbbdac"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for NodeJS
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
- Tencent Cloud SDK 3.0 for Ruby
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
AuthFailure.UnauthorizedOperation | CAM鉴权不通过。 |
FailedOperation.DescribeProducers | 查询生产者数据失败。 |
InternalError.SystemError | 系统错误。 |
InvalidParameterValue.InvalidParams | 参数值不在允许范围内。 |
MissingParameter.NeedMoreParams | 必要参数没有传递。 |
ResourceNotFound.BrokerCluster | 服务的集群不存在。 |
ResourceNotFound.Cluster | 集群不存在。 |
ResourceNotFound.Environment | 环境不存在。 |
ResourceNotFound.Topic | 主题不存在。 |