1、接口协议:
GET https://[endpoint].ctapi.ctyun.cn/v2/queue/consumer
请求参数 | 是否必填 | 位置 | 参数类型 | 说明 |
prodInstId | 是 | url | String | 实例ID |
vhost | 是 | url | String | vhost名称 |
name | 是 | url | String | 队列名称 |
响应参数 | 参数类型 | 描述 |
statusCode | String | 接口系统层面状态码。成功:800,失败:900 |
message | String | 描述状态 |
returnObj | String | 返回对象。此参数所包含的参数请见“响应示例"里面的注释 |
返回值data参数说明
参数名 | 参数类型 | 说明 |
arguments | Map | 消费者参数 |
ack_required | Boolean | 是否需要确认 |
active | Boolean | 消费者是否活动 |
activity_status | String | 消费者活动状态 |
consumer_tag | String | 消费者tag |
exclusive | Boolean | 是否专享 |
prefetch_count | Integer | 预拉取数 |
2、请求示例:
GET https://[endpoint].ctapi.ctyun.cn/v2/queue/consumer?prodInstId=9b9bea76b7ce412ca18f99ccc1ea717b&vhost=/&name=test4
3、返回示例:
成功响应示例
{
"returnObj": {
"data": [
{
"arguments": {},
"ack_required": true,
"active": true,
"activity_status": "up",
"consumer_tag": "amq.ctag-_yk_X9848WX73O8bv4QrFg",
"exclusive": false,
"prefetch_count": 10
}
]
},
"message": "success",
"statusCode": "800"
}
失败响应示例
{
"returnObj": {
"data": "{\"error\":\"not_found\",\"reason\":\"vhost_not_found\"}"
},
"message": "...",
"statusCode": "900"
}