This topic provides an overview of queues in Simple Message Queue (SMQ, formerly MNS), covering their definition, relationship with other components, properties, and limits.
Definition and relationship with other components
In SMQ, a queue is a container that stores messages. Producers send messages to queues, and consumers consume messages from queues.
Features
At-least-once delivery: Each message, within its retention period and maximum delivery attempts, is received and processed by a receiver at least once.
Batch processing: Messages can be sent, received, and deleted in batches, with up to 16 messages per batch.
Long polling: You can receive messages by using long polling to reduce the number of requests and save costs. The maximum wait time for long polling is 30 seconds. For more information, see Short polling and long polling.
Message invisibility duration: After a consumer receives a message, the message becomes invisible to other consumers in the queue for the specified duration. This prevents a message from being processed by multiple consumers at a time. If message processing fails or the message invisibility duration expires, the message can be consumed by another consumer.
Queue properties
Limits
Item | Limit | Description |
Name length | 120 characters | If this limit is exceeded, the queue fails to be created. |
Number of queues | 1,000 Note If you require more queues, you can log on to Quota Center console and submit an application to increase the Maximum Queue Quantity in a Single Region. For more information, see Submit an application to increase a quota. | None. |
Message size | 64 KB | If this limit is exceeded, the message is discarded. |
Batch operations on messages | 16 | None. |
Long polling | 30 seconds | None. |
Message retention period | Seven days | We recommend that you specify a message retention period based on your business requirements. After the specified period expires, the message is deleted. |