Posts

Showing posts with the label SQS

SQS Standard vs. FIFO Queue: Choosing the Right Queue for Payment Event Processing

Payment pipelines are unforgiving: a charge processed twice or an authorization arriving after a capture can cause real financial harm. Choosing between SQS Standard and SQS FIFO is not a performance preference — it is an architectural correctness decision with direct business consequences. TL;DR — At a Glance Dimension Standard Queue FIFO Queue Message Ordering Best-effort (no guarantee) Strict FIFO per Message Group ID Delivery Guarantee At-least-once (duplicates possible) At-least-once delivery with deduplication (exactly-once send semantics within 5-min window) Throughput (default) Nearly unlimited (high TPS) Up to 3,000 msg/s with batching; 300 msg/s without (per queue) High Throughput Mode N/A (already unlimited) Up to 70,000 msg/s (region-dependent; verify current limits in AWS docs) Deduplication Not supported Content-based or explicit Deduplication ID (5-min window) Message Groups Not ...

Understanding SQS Visibility Timeout: Why Your Messages Are Being Processed Twice

SQS visibility timeout controls how long a message stays hidden from other consumers after being received — misconfiguring it is the most common cause of duplicate message processing in production queues. TL;DR: SQS Visibility Timeout at a Glance Scenario What Happens Root Cause Fix Message processed twice Two consumers handle the same message Visibility timeout shorter than processing time Increase timeout or call ChangeMessageVisibility Lambda duplicate invocations Function retried before completion Queue timeout less than 6x Lambda timeout Set queue timeout to at least 6x Lambda timeout Message stuck in flight Never requeued after consumer crash Timeout too long, no delete on failure Tune timeout + configure DLQ Message never retried Failed processing silentl...