link: AWS, Message Queues
AWS SQS
Overview
AWS Simple Queue Service (SQS) is a fully managed message queuing service provided by AWS that enables decoupling and scaling of microservices, distributed systems, and serverless applications. SQS allows you to send, store, and receive messages between software components without losing messages or requiring other services to be available.
Key Features
Summary
- Message Queuing: SQS allows for reliable and scalable message queuing, ensuring that messages are delivered and processed asynchronously.
- Multiple Queue Types: Supports Standard and FIFO (First-In-First-Out) queues to cater to different application requirements.
- Scalability: Automatically scales to handle high throughput of messages.
- Security: Provides message encryption, access control, and policies to secure data and ensure reliable delivery.
How It Works
- Queues: Create a queue that acts as a storage for messages until they are processed.
- Message Sending: Producers send messages to the SQS queue.
- Message Storage: SQS stores the messages in the queue.
- Message Receiving: Consumers retrieve messages from the queue and process them.
- Message Deletion: After processing, consumers delete the messages from the queue to prevent reprocessing.
Combining With SNS
Combining with SQS
Combining Amazon SNS with AWS SQS leverages the power of publishing to multiple recipients with the durability of queues. This integration is beneficial for creating robust, scalable messaging solutions.
Architecture Overview
How It Works:
- Publisher: Sends messages to the Amazon SNS topic.
- SNS Topic: Replicates and sends the received message to all its subscribers.
- Subscribers: Amazon SQS queues act as subscribers to the SNS topic.
- Consumers: Applications or services pull messages from the SQS queues.
This solution guarantees that messages are delivered to applications requiring immediate notifications for some events. They are also persistent, thanks to the queues, and can wait there until a consumer is available.
Link to original