Message Queue
A buffer that decouples a producer from a consumer in time, so neither has to be up, fast, or reachable at the same moment.
A message queue sits between a producer and a consumer, holding messages until the consumer is ready to process them. Its core value is decoupling: the producer doesn't need the consumer to be running, reachable, or fast at the moment it sends — it hands the message to the queue and moves on, and the consumer picks it up whenever it can, at its own pace. That's a fundamentally different contract than a direct synchronous call, where the caller blocks until the callee finishes or errors.
Queues come with delivery guarantees that matter more than they first appear to. At-most-once delivery can silently drop a message on a crash. At-least-once — the far more common default (RabbitMQ, SQS, Kafka in most configurations) — guarantees a message is never lost but may be delivered more than once, typically when a consumer crashes after processing a message but before acknowledging it. That combination means any consumer built on an at-least-once queue must be written to be idempotent, since redelivery isn't an edge case, it's the queue's normal operating mode.
Pub/sub is the closely related pattern of one message reaching many independent consumers instead of exactly one — a topic broadcasting to every subscriber rather than a queue handing a job to a single worker. Kafka blurs the line by keeping messages in an ordered, replayable log that many consumer groups can each read independently at their own position, which is also the foundation Event Sourcing and Change Data Capture pipelines are usually built on top of.
See also5
Event Sourcing
Storing every change that ever happened, instead of only the current state, so the current state becomes a derived view.
Data & Content5 connections
Change Data Capture
Turning a database's own internal write log into a stream other systems can subscribe to, without touching the application.
Data & Content8 connections
Idempotence
The property that performing an operation twice has the same effect as performing it once.
Systems & Tooling23 connections
Eventual Consistency
A guarantee that replicas converge given no further updates, without guaranteeing when.
Networks & Distribution16 connections
Backpressure
Backpressure is a slow receiver telling a fast sender to hold up, so a queue grows on purpose instead of by accident.
Networks & Distribution5 connections
Linked from5
- Actor ModelComputation & Algorithms
A concurrency model where isolated actors communicate only by asynchronous message, never by shared memory.
- BackpressureNetworks & Distribution
Backpressure is a slow receiver telling a fast sender to hold up, so a queue grows on purpose instead of by accident.
- Change Data CaptureData & Content
Turning a database's own internal write log into a stream other systems can subscribe to, without touching the application.
- Event SourcingData & Content
Storing every change that ever happened, instead of only the current state, so the current state becomes a derived view.
- Write-Behind CacheData & Content
A cache that acknowledges a write immediately and persists it to the real store later, trading durability for write latency.