# QueryConsumerGroupList
使用AMQP服务端订阅时,可以调用该接口查询用户所有消费组列表,或按消费组名称进行模糊查询。
# 请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | QueryConsumerGroupList | 系统规定参数。取值:QueryConsumerGroupList。 |
| CurrentPage | Integer | 是 | 1 | 指定显示返回结果中的第几页,最小值为1。 |
| PageSize | Integer | 是 | 2 | 指定返回结果中每页显示的消费组数量,最小值为1,最大值为1000。 |
| IotInstanceId | String | 是 | 71592493182878**** | 实例ID。您可在物联网平台控制台的实例概览页面,查看当前实例的ID。 |
| Fuzzy | Boolean | 否 | false | 是否使用模糊查询。可选值:true:使用模糊查询,需指定GroupName参数。false:不使用模糊查询。默认为false。 |
| GroupName | String | 否 | A类消费组 | 要查询的消费组名称,当Fuzzy取值为true时必须传入。 |
# 返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Code | String | iot.system.SystemException | 调用失败时,返回的错误码。 |
| CurrentPage | Integer | 1 | 当前页码。 |
| Data | Array of ConsumerGroupDTO | 调用成功时,返回的消费组详情,请参见ConsumerGroupDTO。 | |
| ConsumerGroupDTO | |||
| CreateTime | String | 2025-06-20 10:53:44 | 消费组创建时间。 |
| GroupId | String | 7238530835488***** | 消费组ID。 |
| GroupName | String | XX消费组1 | 消费组名称。 |
| ErrorMessage | String | 系统异常 | 调用失败时,返回的出错信息。 |
| PageCount | Integer | 4 | 返回结果总页数。 |
| PageSize | Integer | 2 | 每页显示的消费组数。 |
| RequestId | String | 71a86574e8aa4c069d600e7658b3a533 | 平台为该请求生成的唯一标识符。 |
| Success | Boolean | true | 是否调用成功。true:调用成功。false:调用失败。 |
| Total | Integer | 8 | 查询到的消费组总数。 |
# 示例
请求示例
http://open.${区域}.fenydata.com/fenydata-java-open/?Action=QueryConsumerGroupList
&IotInstanceId=70255861902711****
&CurrentPage=1
&PageSize=2
&Fuzzy=true
&GroupName=A类消费组
&<公共请求参数>
正常返回示例
XML格式
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xml>
<RequestId>22b456f1f0da40b1bac8d1695d6e67f6</RequestId>
<PageSize>2</PageSize>
<PageCount>3</PageCount>
<CurrentPage>1</CurrentPage>
<Total>5</Total>
<Data>
<ConsumerGroupDTO>
<CreateTime>2025-06-20 10:53:44</CreateTime>
<GroupId>238530835488*****</GroupId>
<GroupName>d</GroupName>
</ConsumerGroupDTO>
<ConsumerGroupDTO>
<CreateTime>2025-06-20 10:32:36</CreateTime>
<GroupId>7238477647896*****</GroupId>
<GroupName>c</GroupName>
</ConsumerGroupDTO>
</Data>
<Success>true</Success>
</xml>
JSON格式
{
"RequestId": "3a10b5b4b80448ecaa782399861e072e",
"PageSize": 10,
"PageCount": 1,
"CurrentPage": 1,
"Total": 5,
"Data": {
"ConsumerGroupDTO": [
{
"CreateTime": "2025-06-20 10:53:44",
"GroupId": "7238530835488*****",
"GroupName": "d"
},
{
"CreateTime": "2025-06-20 10:32:36",
"GroupId": "7238477647896*****",
"GroupName": "c"
}
]
},
"Success": true
}