Queues & messaging · Key takeaways

1 min read
Senior15 min read
Rapid overview

Key takeaways

  • Work queue for jobs, pub/sub for fan-out events, partitioned log for replayable ordered streams.
  • At-least-once plus idempotent consumers is the practical guarantee; exactly-once is effectively-once.
  • Outbox for publishing, inbox or dedup table for consuming: no distributed transaction needed.
  • Order per key by partitioning on that key; retries can reorder.
  • Exponential backoff with jitter for transient errors, DLQ for permanent ones, and someone who owns the DLQ.
  • Monitor consumer lag in seconds; queues absorb bursts but do not add capacity.

See also