- Home›
- Products›
- Amazon SQS›
- Amazon SQS features
Amazon SQS features
Queue types
Open allAmazon SQS offers two queue types for different application requirements:
Standard Queues
Unlimited Throughput : Standard queues support a nearly unlimited number of transactions per second (TPS) per API action.
At-Least-Once Delivery : A message is delivered at least once, but occasionally more than one copy of a message is delivered.
Best-Effort Ordering : Occasionally, messages might be delivered in an order different from which they were sent.]
You can use standard message queues in many scenarios, as long as your application can process messages that arrive more than once and out of order, for example:
FIFO Queues
High Throughput :By default, FIFO queues support up to 3,000 messages per second with batching or up to 300 messages per second (300 send, receive, or delete operations per second) without batching. If you require higher throughput, you can enable high throughput mode for FIFO on the Amazon SQS console, which will support up to 70,000 messages per second without batching and even higher with batching. For a detailed breakdown of FIFO high throughput mode quotas per region, please see Amazon Web ServicesWS Documentation.
Exactly-Once Processing : A message is delivered once and remains available until a consumer processes and deletes it. Duplicates aren't introduced into the queue.
First-In-First-Out Delivery : The order in which messages are sent and received is strictly preserved (i.e. First-In-First-Out).
FIFO queues are designed to enhance messaging between applications when the order of operations and events is critical, or where duplicates can't be tolerated, for example:
Functionality
Open allUnlimited queues and messages: Create unlimited Amazon SQS queues with an unlimited number of messages in any Region
Payload Size: Message payloads can contain up to 256KB of text in any format. Each 64KB ‘chunk’ of payload is billed as 1 request. For example, a single API call with a 256KB payload will be billed as four requests.
Batches: Send, receive, or delete messages in batches of up to 10 messages or 256KB. Batches cost the same amount as single messages, meaning SQS can be even more cost effective for customers that use batching.
- Long polling: Reduce extraneous polling to minimize cost while receiving new messages as quickly as possible. When your queue is empty, long-poll requests wait up to 20 seconds for the next message to arrive. Long poll requests cost the same amount as regular requests.
- Fair queues: Mitigate noisy neighbor impact in multi-tenant queues. When one tenant sends a large volume of messages or requires longer processing time, fair queues help maintain consistent time between sending and receiving messages across all tenants. Enable fair queues by adding a message group ID to your messages, with no changes required to your consumers.
Retain messages in queues for up to 14 days.
Send and read messages simultaneously.
Message locking: When a message is received, it becomes “locked” while being processed. This keeps other computers from processing the message simultaneously. If the message processing fails, the lock will expire and the message will be available again.
Queue sharing: Securely share Amazon SQS queues anonymously or with specific Amazon Web ServicesWS accounts. Queue sharing can also be restricted by IP address and time-of-day.
Server-side encryption (SSE): Protect the contents of messages in Amazon SQS queues using keys managed in the AmazonWS Key Management Service (AmazonWS KMS). SSE encrypts messages as soon as Amazon SQS receives them. The messages are stored in encrypted form and Amazon SQS decrypts messages only when they are sent to an authorized consumer.
Dead Letter Queues (DLQ): Handle messages that have not been successfully processed by a consumer with Dead Letter Queues. When the maximum receive count is exceeded for a message it will be moved to the DLQ associated with the original queue. Set up separate consumer processes for DLQs which can help analyze and understand why messages are getting stuck. DLQs must be of the same type as the source queue (standard or FIFO).
Using Amazon SQS with other Amazon Web Services infrastructure web services
Open allAmazon SQS message queuing can be used with other Amazon Web ServicesWS services such as Amazon Redshift, Amazon DynamoDB, Amazon Relational Database Service (RDS), Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), AmazonWS Lambda, and Amazon S3, to make distributed applications more scalable and reliable. Below are some common design patterns:
Intended usage and restrictions
Open allYour use of this service is subject to the Amazon Web Services Customer Agreement.