Dung (Donny) Nguyen

Senior Software Engineer

Amazon Simple Queue Service

Amazon Simple Queue Service (SQS) is a fully managed message queuing service offered by AWS. It allows us to send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available.

AWS SQS

Key Features

How It Works

Flow

  1. Creating a Queue: You start by creating a queue in SQS. This queue acts as a temporary repository for messages that are awaiting processing.

  2. Sending Messages: Applications or services send messages to the queue. These messages can contain any type of information that needs to be processed by another component.

  3. Storing Messages: SQS stores these messages redundantly across multiple servers to ensure high availability and durability.

  4. Receiving Messages: The receiving component retrieves messages from the queue. This can be done on-demand or by polling the queue at regular intervals.

  5. Processing Messages: Once a message is retrieved, it is processed by the receiving component. After processing, the message is deleted from the queue to prevent it from being processed again.

  6. Visibility Timeout: SQS provides a visibility timeout feature, which ensures that once a message is retrieved, it is not visible to other components for a specified period. This prevents multiple components from processing the same message simultaneously.

  7. Dead-Letter Queues: SQS supports dead-letter queues, which are used to store messages that cannot be processed successfully after a specified number of attempts. This helps in debugging and handling errors gracefully.

Types of queues

Standard Queues

FIFO Queues

Reference:

Related Posts: Google Cloud Pub/Sub