tool

Message Queue

A store that holds messages until a consumer processes them, decoupling producer availability and rate from consumer availability and rate.

messagingasyncdecoupling

The three things a queue actually buys: the producer no longer waits for the consumer, the consumer's downtime becomes backlog rather than lost work, and a burst is absorbed and processed at the consumer's own pace instead of overwhelming it.

The semantics to be explicit about, because they are where the bugs are. Delivery is normally at-least-once, so consumers must be idempotent — exactly-once is achievable only as "effectively once" with deduplication, never as a network guarantee. Ordering is usually per-partition or per-queue, not global, and it is lost the moment you add concurrent consumers. And every queue needs a dead letter queue plus an alarm on it, or poison messages block the consumer or vanish silently.

Contrast with an event stream: a queue's message is consumed and gone; a stream's event is retained and can be re-read by new consumers later.