Querying the Consumer Group List
Function
This API is used to query the consumer group list.
URI
GET /v2/{project_id}/instances/{instance_id}/groups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group |
No |
String |
Consumer group name. |
limit |
No |
Integer |
Number of records to query. Default: 10 |
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. Default: 0 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Number |
Total number of consumer groups. |
groups |
Array of ConsumerGroup objects |
Consumer group list. |
max |
Integer |
Maximum number of consumer groups that can be created. |
remaining |
Integer |
Number of consumer groups that can still be created. |
next_offset |
Integer |
Offset of the next page. |
previous_offset |
Integer |
Offset of the previous page. |
Parameter |
Type |
Description |
---|---|---|
enabled |
Boolean |
Whether consumption is allowed. |
broadcast |
Boolean |
Whether to broadcast. |
brokers |
Array of strings |
List of associated brokers. |
name |
String |
Consumer group name. Enter 3 to 64 characters. Use only letters, digits, percent (%), vertical bars (|), hyphens (-), and underscores (_). |
group_desc |
String |
Consumer group description (0 to 200 characters). Minimum: 0 Maximum: 200 |
retry_max_time |
Integer |
Maximum number of retries (1 to 16 characters). |
createdAt |
Long |
Timestamp creation time |
permissions |
Array of strings |
Permission set |
consume_orderly |
Boolean |
Indicates whether to enable orderly consumption. |
Example Requests
Querying the consumer group list of a RocketMQ instance
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/groups
Example Responses
Status code: 200
Consumer groups queried successfully.
-
{ "total" : 1, "groups" : [ { "name" : "group-1", "enabled" : true, "broadcast" : false, "brokers" : [ "broker-0" ], "createdAt" : 1709087952686, "permissions" : [ ], "retry_max_time" : 16, "consume_orderly" : false } ], "max" : 4000, "remaining" : 3999, "next_offset" : -1, "previous_offset" : -1 }
Status Codes
Status Code |
Description |
---|---|
200 |
Consumer groups queried successfully. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot