Amazon SQS Flashcards
SQS
Amazon Simple Queue Service (SQS) is a distributed queue system that enables web service applications to quickly and reliably queue messages that one component in the application generates to be consumed by another component.
Amazon SQS enables you to send, store, and receive messages between software components.
An Amazon SQS queue is a temporary repository for messages that are awaiting processing.
The SQS queue resolves issues …. What Issue ?
The SQS queue resolves issues that arise if the producer is producing work faster than the consumer can process it, or if the producer or consumer are only intermittently connected to the network.
Message Size ?
Messages are up to 256KB in size.
Message Retention Period
Messages can be kept in the queue from 1 minute to 14 days.
The default retention period is 4 days.
SQS guarantees that your messages will be processed at least once.
Default Retention Period
The default retention period is 4 days.
Two Types of Queues
tandard queues and FIFO queues.
Queue names must be unique within a region ? T/F
True
Standard Queue Facts
Default queue type.
Nearly unlimited transactions per second.
Guarantee that a message is delivered at least once.
Occasionally more than one copy of a message might be delivered out of order.
Provides best-effort ordering which ensures that messages are generally delivered in the same order as they are sent.
FIFO Facts
Delivers exactly-once processing.
The order in which messages are sent and received is strictly preserved and a message is delivered once and remains available until a consumer processes and deletes it.
Duplicates are not introduced into the queue.
FIFO queues also support message groups that allow multiple ordered message groups within a single queue.
TPS on FIFO Queues
Limited to 300 transactions per second (TPS) but have all the capabilities of standard queues.
Sequencing with FIFO queues Steps
To ensure strict ordering between messages, specify a MessageGroupId.
Messages with a different Group ID may be received out of order.
Messages with the same Group ID are delivered to one consumer at a time.
What is FIFO Message Group ID:
The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are guaranteed to be processed in a FIFO manner.
What is Message Deduplication ID:
The token used for deduplication of messages within the deduplication interval.
Standard Queue VS FIFO Queue
Standard QueueFIFO Queue
Unlimited Throughput:
Standard queues support a nearly unlimited number of transactions per second (TPS) per API action.High Throughput:
FIFO queues support up to 300 messages per second (300 send, receive, or delete operations per second). When you batch 10 messages per operation (maximum), FIFO queues can support up to 3,000 messages per second
Best-Effort Ordering:
Standard queues Occasionally, messages might be delivered in an order different from which they were sentFirst-ln-First-out Delivery:
FIFO queues The order in which messages are sent and received is strictly preserved
At-Least-Once Delivery: Standard queues A message is delivered at least once, but occasionally more than one copy of a message is delivered
FIFO queues Exactly-Once Processing: A message is delivered once and remains available until a consumer processes and deletes it. Duplicates are not introduced into the queue
Visibility timeout
The amount of time a message is invisible in the queue after a reader picks it up.
Provided the job is processed before the visibility timeout expires, the message will then be deleted from the queue.
If the job is not processed within the visibility timeout, the message will become visible again and another reader will process it.
This could result in the same message being delivered twice.
The default visibility timeout is 30 seconds.
Increase it if your task takes >30 seconds.
The maximum is 12 hours.