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

消息队列 RocketMQ版

复制全文
下载 pdf
Topic管理
DescribeTopics - 查看 Topic 列表
复制全文
下载 pdf
DescribeTopics - 查看 Topic 列表
调用 DescribeTopics 接口查看 Topic 列表。​
使用说明​
此接口用于查看指定实例的 Topic 列表,也可以用于查看某个 Topic 的基础信息。​
注意事项​
请求频率:该接口请求频率限制为 100 次/秒;单用户请求频率限制为 20 次/秒。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeTopics​
要执行的操作,取值:DescribeTopics。​
​
Version string 必选 示例值:2023-01-01​
API的版本,取值:2023-01-01。​
​
InstanceId string 必选 示例值:rocketmq-cnai1f0c2****​
实例 ID。​
​
PageNumber integer 必选 示例值:1​
列表的页码,最小值为 1。​
​
PageSize integer 必选 示例值:10​
列表中每一页的条目数量,取值范围为 1~100。​
​
TopicName string 可选 示例值:testtopic​
Topic 名称,设置此参数表示根据指定的 Topic 名称进行筛选,支持模糊匹配。​
​
SortBy string 可选 示例值:CreateTime​
实例查询结果排序字段。默认使用 CreateTime 进行排序。可设置为:​
  • CreateTime:Topic 创建时间​
  • QueueNumber:Topic 队列数量​
​
SortOrder string 可选 示例值:Desc​
实例查询使用的排序方式。默认为 Desc,即降序。​
  • Asc:升序​
  • Desc:降序​
​
MessageType integer 可选 示例值:0​
消息类型。设置此参数表示根据指定的消息类型筛选 Topic 列表。取值说明如下:​
  • 0:普通消息​
  • 1:事务消息​
  • 2:分区顺序消息​
  • 3:全局顺序消息​
  • 4:延时消息​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
InstanceId string 示例值:rocketmq-cnai1f0c29ca****​
实例 ID。​
​
TopicsInfo object[] 示例值:/​
符合查询条件的 Topic 列表。​
CreateTime string 示例值:2023-01-09T06:30:18Z​
Topic 创建时间。​
​
Description string 示例值:test​
Topic 描述。​
​
MessageType integer 示例值:0​
消息类型。取值说明如下:​
  • 0:普通消息​
  • 1:事务消息​
  • 2: 分区顺序消息​
  • 3: 全局顺序消息​
  • 4:延时消息​
​
QueueNumber integer 示例值:10​
队列个数。​
​
TopicName string 示例值:rocketmq123​
Topic 名称。​
​
​
Total integer 示例值:1​
符合查询条件的 Topic 总数。​
​
​
​
请求示例​
​
POST /?Action=DescribeTopics&Version=2023-01-01 HTTP/1.1​
Host: rocketmq.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20260109T103736Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260109/cn-beijing/RocketMQ/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"InstanceId": "rocketmq-cnai1f0c2****",​
"PageNumber": 1,​
"PageSize": 10​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2026010918355414812918424622****",​
"Action": "DescribeTopics",​
"Version": "2023-01-01",​
"Service": "RocketMQ",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "rocketmq-cnai1f0c29ca****",​
"TopicsInfo": [​
{​
"CreateTime": "2023-01-09T06:30:18Z",​
"Description": "test",​
"MessageType": 0,​
"QueueNumber": 10,​
"TopicName": "rocketmq123"​
}​
],​
"Total": 1​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
200​
OK​
OK​
成功。​
400​
MissingParameter​
The request body is missing a required parameter %s.​
缺少%s参数。​
400​
UnsupportedParameter​
The specified parameter %s is unsupported.​
不支持%s参数。​
400​
InvalidParameter​
The specified parameter %s is not valid.​
参数值%s无效,请检查后重试。​
400​
NotModifiedParameter​
The resource was not changed.​
未变更任何配置。​
400​
InvalidPara​
The specified parameter is not valid.​
参数值无效。​
400​
OperationDenied.InvalidRequest​
The request that you specified is not valid.​
请求异常,请检查后重试。​
403​
OperationDenied.AccountNotAuthorized​
You are not authorized to perform this operation.​
您不具备相关权限,请授权或切换账号后重试。​
403​
OperationDenied.ResourceOccupied​
The resource is busy now, please try again later.​
资源繁忙,可能由于指定资源正在被访问或回收。​
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.​
实例不存在。​
500​
InternalError​
The request failed due to some unknown error, exception or failure.​
内部错误,请稍后再试。​
500​
ServerInternalError​
The request failed due to some unknown error, exception or failure.​
服务内部错误。​
500​
ResourceIsBusy​
The resource is busy now, please try again later.​
资源繁忙,可能由于指定资源正在被访问或回收。​
503​
ServiceUnavailable​
The request failed due to a temporary failure of the server.​
当前服务暂时不可用。​
​
​
最近更新时间:2026.02.13 18:31:52
这个页面对您有帮助吗?
有用
有用
无用
无用