All Products
Search
Document Center

Simple Message Queue (formerly MNS):Queue

Last Updated:Mar 10, 2026

A queue in Simple Message Queue (SMQ, formerly MNS) is a message container where producers send messages and consumers retrieve them.

image

Features

At-least-once delivery

Each message is delivered to a consumer at least once within its retention period and maximum delivery attempts. Design your consumers to handle duplicates through idempotent operations -- processing the same message multiple times should not change the outcome.

Batch processing

Send, receive, and delete up to 16 messages in a single batch request, reducing the number of API calls.

Long polling

With long polling, a receive request waits up to 30 seconds for a message to arrive instead of returning an empty response immediately. This reduces request volume and lowers costs. For details, see Short polling and long polling.

Visibility timeout

After a consumer receives a message, the message becomes invisible to other consumers for a configurable duration. This prevents multiple consumers from processing the same message simultaneously. If message processing fails or the visibility timeout expires, the message returns to the Active state and may be repeatedly delivered. Set this value to match or exceed the expected processing time of your consumer.

Queue properties

PropertyDescriptionValid valuesDefaultUnit
Queue nameGlobally unique identifier of the queue within a cluster. Must start with a letter or digit. Can contain letters, digits, and hyphens (-).Up to 120 characters----
Maximum message sizeMaximum size of the message body that can be sent to the queue.1--64[needs confirmation]KB
Long polling periodWait time for long polling. 0 disables long polling. Any non-zero value enables long polling: the system returns a response only after a valid message is received or the wait time elapses.0--30[needs confirmation]Seconds
Message visibility timeout periodDuration a message stays in the Inactive state after a consumer receives it. If message processing fails or the timeout expires, the message returns to the Active state and may be repeatedly delivered. Set this value to match the expected processing time of your consumer.1--43,200 (1 second to 12 hours)[needs confirmation]Seconds
Message retention periodMaximum time a message is kept in the queue. After this period, the message is deleted regardless of whether it has been consumed.60--604,800 (1 minute to 7 days)[needs confirmation]Seconds
Message delay timeDefault delay applied to all messages sent to the queue. Messages are not available for consumption until the delay period elapses.0--604,800 (0 seconds to 7 days)[needs confirmation]Seconds
LoggingEnables or disables log collection for the queue. When enabled, SMQ pushes operation logs to a logging bucket where message traces, delays, and other operational data are available. For details, see Log management.true, false[needs confirmation]--
Default values are not documented in the source. Verify the defaults listed above against the SMQ console or API before publishing.

Limitations

ResourceLimitWhat happens
Queue name length120 charactersQueue creation fails.
Queues per region1,000Queue creation fails. To request a higher quota, go to Quota Center and increase the Maximum Queue Quantity in a Single Region quota. For instructions, see Submit an application to increase a quota.
Message size64 KBThe message is discarded.
Messages per batch operation16--
Long polling wait time30 seconds--
Message retention7 days (604,800 seconds)After the retention period expires, the message is deleted regardless of whether it has been consumed. Set a retention period that matches your business requirements.