Definition: Amazon SQS is a fully managed message queuing service that enables decoupling and asynchronous communication between application components.
Key Concepts:
Messages: Data payloads (up to 256 KB).
Queues: Containers for messages.
Producers/Consumers: Apps that send/receive messages.
Use Cases: Task queues, workload buffering, distributed systems.
1. SQS Queue Types
Standard Queue
Purpose: High throughput, at-least-once delivery.
Features:
Unlimited throughput.
Possible duplicates, out-of-order delivery (best-effort ordering).
Explanation: Scales massively but sacrifices strict ordering for speed.
Use Case: General-purpose messaging (e.g., order processing).
FIFO Queue (First-In-First-Out)
Purpose: Ordered, exactly-once delivery.
Features:
3,000 messages/second with batching (300 without).
Message group ID for parallel processing, deduplication ID to prevent duplicates.
Explanation: Guarantees order within a message group; deduplication window is 5 minutes.
Use Case: Financial transactions, sequential tasks.
Key Notes:
Exam Relevance: Standard for scale, FIFO for order—know trade-offs.
Mastery Tip: Understand message group ID for FIFO parallelism.