Producers : components that send messages to the queue
Consumers : components that receive messages from the queue
Queue : which holds messages and redundantly stores the messages across multiple Amazon SQS servers
Amazon SQS automatically deletes messages that have been in a queue for more than the maximum message retention period. The default message retention period is 4 days. However, you can set the message retention period up to 14 days
Queue Types
Standard
Unlimited Throughput : support a nearly unlimited number of API calls per second, 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 are delivered in an order different from which they were sent
FIFO (First In First Out)
High Throughput :
With batching, support up to 3,000 calls per second, per API method.
Without batching, FIFO queues support up to 300 API calls per second, per API method
Exactly-Once Processing, A message is delivered once and remains available until a consumer processes and deletes it
First-In-First-Out Delivery: The order in which messages are sent and received is strictly preserved.
Lifecycle
A producer sends message A to a queue, and the message is distributed across the Amazon SQS servers redundantly.
When a consumer is ready to process messages, it consumes messages from the queue, and message A is returned. While message A is being processed, it remains in the queue and isn't returned to subsequent receive requests for the duration of the visibility timeout.
The consumer deletes message A from the queue to prevent the message from being received and processed again when the visibility timeout expires.
Short and Long polling
Amazon SQS provides short polling and long polling to receive messages from a queue. By default, queues use short polling
Short polling : Amazon SQS sends the response right away, even if the query found no messages.
Long polling : Amazon SQS sends a response after it collects at least one available message, up to the maximum number of messages specified in the request. Amazon SQS sends an empty response only if the polling wait time expires.