- Service Overview
- Getting Started
- User Guide
- Developer Guide
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
APIs for Managing Queues and Messages
- Creating a Queue
- Viewing All Queues
- Viewing a Queue
- Deleting a Queue
- Creating a Consumer Group
- Viewing All Consumer Groups of a Specified Queue
- Deleting a Consumer Group
- Sending Messages to a Queue
- Consuming Messages
- Acknowledging Consumption of Specified Messages
- Viewing Quotas
- Consuming Dead Letter Messages
- Acknowledging Consumption of Specified Dead Letter Messages
- FAQ
- Appendix
- Change History
- Best Practices
-
FAQs
- Does DMS Support FIFO Delivery?
- Does DMS Support "At Least Once" Message Delivery?
- How Long Can a Message be Retained in a Queue?
- What Is the Maximum Size of a Message?
- Does DMS Guarantee Zero Message Repetition?
- How Does DMS Ensure Message Security in a Queue?
- How Many Queues Can Be Created Under a Project?
- How Many Consumer Groups Can Be Created in Each Queue?
- Why Can't I Retrieve the Chosen Number of Messages from a Queue That Contains Only a Few Messages?
- Why Do Consumers Need to Acknowledge Messages?
- Will Duplicate Messages Be Retrieved After "Delay Message Delivery" Is Enabled?
- Will Duplicate Messages Be Retrieved After Redelivery?
- What Are the Differences Between Kafka Queues and Kafka Premium Instances?
- Do RabbitMQ or Kafka Premium Instances Support Cross-VPC Access?
- Do RabbitMQ or Kafka Premium Instances Support Cross-Subnet Access?
- How to Select and Configure a Security Group?
- Can I Access DMS Over a Public Network?
- Where Does a Newly Created Consumer Group Start Message Retrieval?
- How Is the Performance of Global FIFO Queues?
- Why Can't I View the Subnet and Security Group Information When Creating a DMS Instance?
- What If One RabbitMQ VM Fails to Be Restarted When a Cluster RabbitMQ Instance Is Being Restarted?
- How Are Requests Evenly Distributed to Each VM of a Cluster RabbitMQ Instance?
- Do Queues Inside a Cluster RabbitMQ Instance Have Any Redundancy Backup?
- DMS Password Complexity Requirements
- General Reference
Copied.
Creating a Consumer Group
Function
This API is used to create a consumer group.
Multiple consumer groups can be created for a queue at a time.
After you create a consumer group, it takes 1s to 3s to initialize the system. If you operate the queue immediately after creating the consumer group, the consumption may fail. You are advised to perform these operations three seconds after creating the queue.
Request
Request parameters
Table 2 describes the request parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
groups |
Array |
Yes |
Indicates the consumer group information. A maximum of three consumer groups can be created for a queue. If there are more than three consumer groups in the request, the request will fail and consumer groups cannot be created. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
name |
String |
Yes |
Indicates the name of a consumer group. The value is a string of 1 to 32 characters that contain letters, digits, hyphens (-), and underscores (_). |
Example request
{ "groups" : [{ "name" : "group-aa" } ] }
Response
Response parameters
Table 4 describes the response parameters.
Parameter |
Type |
Description |
---|---|---|
id |
String |
Indicates the consumer group ID. |
name |
String |
Indicates the name of a consumer group. |
Example response
{ "groups" : [{ "id" : "g-02fb1974-9be1-4eee-8448-ed2d3e89884a", "name" : "group-aa" } ] }
Status Code
Table 5 lists the status code indicating that the operation is successful. For details about the status codes indicating that the operation fails, see Status Code.
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