- 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
On this page
Show all
Help Center/
Distributed Message Service/
FAQs/
Why Can't I Retrieve the Chosen Number of Messages from a Queue That Contains Only a Few Messages?
Copied.
Why Can't I Retrieve the Chosen Number of Messages from a Queue That Contains Only a Few Messages?
- Messages in a global FIFO queue are stored in a single partition. Upon each retrieval request, the chosen number of messages can be returned, unless the available number of messages in the queue is less than the chosen number of messages.
- Messages in other types of queues are distributed to multiple partitions. This achieves high concurrency, allowing multiple requests from a consumer group to be processed concurrently. To avoid performance loss caused by cross-partition access and management, a single retrieval request from a consumer group returns messages in only one partition. Therefore, when a queue holds a small number of available messages, a single retrieval request may not return the chosen number of messages even if the number of available messages in the queue is greater than the chosen number of messages.
For example, as shown in Figure 1, 12 messages exist in the queue and are distributed in three partitions. If the chosen number of messages is 10, only four messages can be retrieved from Partition 0. After retrieval from Partition 0 is complete, messages are retrieved from Partition 1 and then from Partition 2.
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot