Skip to main content

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​

TypeOrderDeliveryName
StandardBest effortAt least once; a message may, rarely, arrive twice[A-Za-z0-9_-], 1 to 80 characters
FIFOStrict within each message groupExactly once within the 5-minute deduplication window1 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​

AttributeRangeDefaultWhat it does
Visibility timeout0 to 43,200 s (12 h)30 sHow long a received message stays invisible to other consumers
Message retention60 s to 1,209,600 s (14 days)345,600 s (4 days)After that, an unprocessed message is discarded
Delivery delay0 to 900 s (15 min)0How long a new message waits before becoming visible
Receive wait time0 to 20 s0Long polling: the receive call waits for messages instead of returning empty
Maximum message size1 KiB to 1 MiB1 MiBLarger 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 a MessageDeduplicationId when 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:

FieldValue
Dead-letter queueA queue of the same organization and the same type (Standard with Standard, FIFO with FIFO)
Maximum receives1 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.

tip

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​

QuotaValue
Active queues per organization1,000
Maximum message size1 MiB
Test message from the Console256 KiB
Messages per batch (SendMessageBatch, DeleteMessageBatch)10
Tags per queue50
Purgeone per queue every 60 s
Reuse of a deleted nameafter 60 s
Running redrive tasksone per dead-letter queue

Above the allowed request rate, the API answers RequestThrottled; retry with increasing backoff, as the AWS SDKs already do.