Queues
Queues overview
Queues stores messages until your application processes them. The producer sends (SendMessage), the consumer receives (ReceiveMessage) and, after processing, deletes (DeleteMessage). While a consumer holds it, the message is invisible to the others for the visibility timeout; if it is not deleted within that time, it goes back to the queue and is delivered again.
The API is compatible with Amazon SQS: applications use the AWS SDKs and the AWS CLI with the Queues address and the br-se-1 region (see SDK examples). Both the SQS JSON and Query protocols are accepted.
In the Console, the Queues page lists the organization's queues with search, filters and approximate message counts. The Dead-letter queues subsection shows only the queues used as the destination of messages that failed.
Types
| Type | Order | Delivery | Name |
|---|---|---|---|
| Standard | Best effort | At least once; a message may, rarely, arrive twice | [A-Za-z0-9_-], 1 to 80 characters |
| FIFO | Strict within each message group | Exactly once within the 5-minute deduplication window | 1 to 75 characters plus the .fifo suffix |
In FIFO queues every message carries a MessageGroupId: messages of the same group leave in the order they arrived, and different groups move forward in parallel. Deduplication uses the MessageDeduplicationId you provide or, with content-based deduplication on, a hash of the body.
The type is chosen at creation and cannot change later. To change the type, create a new queue.
Attributes
| Attribute | Range | Default | What it does |
|---|---|---|---|
| Visibility timeout | 0 to 43,200 s (12 h) | 30 s | How long a received message stays invisible to other consumers |
| Message retention | 60 s to 1,209,600 s (14 days) | 345,600 s (4 days) | After that, an unprocessed message is discarded |
| Delivery delay | 0 to 900 s (15 min) | 0 | How long a new message waits before becoming visible |
| Receive wait time | 0 to 20 s | 0 | Long polling: the receive call waits for messages instead of returning empty |
| Maximum message size | 1 KiB to 1 MiB | 1 MiB | Larger messages are refused |
FIFO queues also have content-based deduplication, the deduplication scope (queue or message group) and the throughput limit (per queue or per message group).
Each queue accepts up to 50 tags. Message counts (available, in flight and delayed) are approximate: they help you follow operations, not billing.
Test message
On the queue page, anyone with the Editor role can send one test message to check the configuration without writing code:
- a body of up to 256 KiB;
- an optional delay (Standard queues only);
- a required
MessageGroupId, and aMessageDeduplicationIdwhen content-based deduplication is off (FIFO queues); - up to 10 message attributes of type String or Number.
The test message is a request like any other and is metered. The Console does not receive or delete messages: consumption is always done by your application.
Dead-letter queues
A dead-letter queue (DLQ) receives the messages the source queue could not process. On the source queue you configure a redrive policy with:
| Field | Value |
|---|---|
| Dead-letter queue | A queue of the same organization and the same type (Standard with Standard, FIFO with FIFO) |
| Maximum receives | 1 to 1,000. When received more times than this without being deleted, the message moves to the dead-letter queue |
On the dead-letter queue, the redrive allow policy defines who may use it as a destination: all queues, none, or only the listed queues (up to 10).
The dead-letter queue page shows the source queues that point to it and the history of redrive tasks.
Keep an eye on messages sitting in dead-letter queues: the Overview shows the total, and every message there is a processing attempt that failed repeatedly.
Redrive
After fixing the cause of the failure, you can move the messages from the dead-letter queue back:
- with no destination given, each message returns to its own source queue;
- or all of them go to a destination queue you choose;
- the speed ranges from 1 to 500 messages per second (default 500).
There can be only one running task per dead-letter queue. A running task can be cancelled; messages already moved stay at the destination. The moved-message figures are approximate.
Purge and delete
Purge deletes every message in the queue and keeps the queue and its configuration. Messages disappear within 60 s. Only one purge per queue every 60 s is allowed.
Delete removes the queue and all its messages:
- if the queue is the dead-letter queue of other queues, the deletion must be confirmed and removes the redrive policy of those queues;
- if the queue receives deliveries from Notifications subscriptions, those subscriptions start failing unless you confirm deleting them as well;
- a deleted name can only be reused after 60 s.
Purge and delete cannot be undone.
Quotas
| Quota | Value |
|---|---|
| Active queues per organization | 1,000 |
| Maximum message size | 1 MiB |
| Test message from the Console | 256 KiB |
Messages per batch (SendMessageBatch, DeleteMessageBatch) | 10 |
| Tags per queue | 50 |
| Purge | one per queue every 60 s |
| Reuse of a deleted name | after 60 s |
| Running redrive tasks | one per dead-letter queue |
Above the allowed request rate, the API answers RequestThrottled; retry with increasing backoff, as the AWS SDKs already do.
Was this page helpful?
Report a problem on this pageDo not send passwords, keys, tokens, or customer data.