Lists the subscription relationships for a consumer group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:ListConsumerGroupSubscriptions |
list |
*ConsumerGroup
|
None | None |
Request syntax
GET /instances/{instanceId}/consumerGroups/{consumerGroupId}/subscriptions HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The ID of the ApsaraMQ for RocketMQ instance. |
rmq-cn-tl32wwz1r05 |
| consumerGroupId |
string |
Yes |
The ID of the consumer group whose subscription relationships you want to query. |
PRINT_RETRY_CONSUMER |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| topicName |
string |
No |
The name of the topic. If you do not specify this parameter, all subscription relationships are queried. |
topic_test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Result<List |
||
| requestId |
string |
The request ID. |
5F4D9D5F-625B-59FF-BD4F-DA8284575DB4 |
| success |
boolean |
Indicates whether the request was successful. |
true |
| data |
array<object> |
The data returned. |
|
|
object |
The list of subscription relationships for the consumer group. |
||
| consumerGroupId |
string |
The ID of the consumer group. |
CID-TEST |
| topicName |
string |
The topic to which the consumer group subscribes. |
topic_test |
| messageModel |
string |
The consumption mode of the consumer group.
|
CLUSTERING |
| subscriptionStatus |
string |
The subscription status.
|
ONLINE |
| filterExpression |
string |
The filter expression. |
* |
| filterExpressionType |
string |
The type of the filter expression.
|
SQL |
| topicCreated |
boolean |
Indicates whether the topic is created. |
true |
| consistency |
boolean |
The consistency of the subscription relationship.
|
true |
| code |
string |
The error code. |
MissingInstanceId |
| message |
string |
The error message. |
Parameter instanceId is mandatory for this action . |
| httpStatusCode |
integer |
The HTTP status code. |
200 |
| dynamicCode |
string |
The dynamic error code. |
InstanceId |
| dynamicMessage |
string |
The dynamic error message. |
InstanceId |
Examples
Success response
JSON format
{
"requestId": "5F4D9D5F-625B-59FF-BD4F-DA8284575DB4",
"success": true,
"data": [
{
"consumerGroupId": "CID-TEST",
"topicName": "topic_test",
"messageModel": "CLUSTERING",
"subscriptionStatus": "ONLINE",
"filterExpression": "*",
"filterExpressionType": "SQL",
"topicCreated": true,
"consistency": true
}
],
"code": "MissingInstanceId",
"message": "Parameter instanceId is mandatory for this action .",
"httpStatusCode": 200,
"dynamicCode": "InstanceId",
"dynamicMessage": "InstanceId"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.