Queries the online consumer groups that subscribe to a specified topic.
Operation description
API operations provided by Alibaba Cloud are used to manage and query resources of Alibaba Cloud services. We recommend that you integrate these API operations only in management systems. Do not use these API operations in the core system of messaging services. Otherwise, system risks may occur.
You can call this operation to query the online consumer groups that subscribe to a specified topic. If all consumers in a group are offline, the information about the group is not returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:QueryTopicSubDetail |
get |
Topic
Topic
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the instance that contains the topic you want to query. |
MQ_INST_111111111111_DOxxxxxx |
| Topic |
string |
Yes |
The name of the topic that you want to query. |
test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use this ID to troubleshoot issues. |
87B6207F-2908-42B5-A134-84956DCA**** |
| Data |
object |
The data returned. |
|
| SubscriptionDataList |
object |
||
| SubscriptionDataList |
array<object> |
The information about the online consumer groups that subscribe to the topic. |
|
|
object |
|||
| GroupId |
string |
The ID of the consumer group that subscribes to the topic. |
GID_test |
| MessageModel |
string |
The consumption mode. Valid values:
For more information about consumption modes, see Clustering consumption and broadcasting consumption. |
CLUSTERING |
| SubString |
string |
The expression based on which consumers in the consumer group subscribe to the topic. |
* |
| Online |
string |
Indicates whether the consumer group is online. |
true |
| Topic |
string |
The topic name. |
test |
Examples
Success response
JSON format
{
"RequestId": "87B6207F-2908-42B5-A134-84956DCA****",
"Data": {
"SubscriptionDataList": {
"SubscriptionDataList": [
{
"GroupId": "GID_test",
"MessageModel": "CLUSTERING",
"SubString": "*",
"Online": "true"
}
]
},
"Topic": "test"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.