message queue
A store that holds messages from producers until consumers are ready to process them, decoupling the rate of arrival from the rate of work.
In more detail
It absorbs bursts and lets workers scale independently. Most queues deliver at least once, so consumers must handle duplicates, and ordering is a separate guarantee. Queue depth is a key health measure.
Examples
Kafka never deletes on read; consumer groups layer queue-like sharing on top of its log.In this course: Queues are shared and timing-dependent, so tests usually replace them with a fake, such as a plain list, or use a real one in an integration test. Examples include RabbitMQ and Amazon Simple Queue Service.Related terms
- event-driven architecture — A design in which services communicate by publishing and reacting to events, instead of calling each other directly and waiting.
- worker — A background process that takes jobs or messages from a queue and does the work, separately from the process that answered the request.
- dead letter queue — A separate queue where messages that keep failing are moved, so they stop blocking others and can be inspected and replayed later.
- at-least-once delivery — A delivery guarantee under which every message arrives, but some may arrive more than once.
- append-only log — A data structure where new entries are only ever added at the end and existing entries are never changed in place.
- RabbitMQ — A widely used open-source message broker that routes messages into queues for consumers.
- Amazon SQS — A fully managed message queue service from Amazon Web Services.
- consumer group — A set of consumers sharing one group ID that divide a topic's partitions between them so each partition is read by only one member at a time.
- backing service — Any service an application uses over the network, such as a database, cache, queue, mail relay or payments provider.
- process type — A named kind of work an app does, such as web for requests, worker for queued jobs or clock for scheduled tasks.
- disposability — The property of a process that can be started or stopped at a moment’s notice without harm.
- broker — A server that receives messages from producers, stores them and delivers them to consumers, such as RabbitMQ or Apache Kafka.
- background worker — A process that runs outside the request path and handles work such as publishing events or sending emails.
- producer — The program that creates and sends messages or events.
- consumer — A program that receives and processes messages or events, or more broadly any client that uses an API.
- acknowledgement — A reply that confirms a message or delivery was received and safely recorded, so the sender can stop retrying it.
- bounded queue — A waiting line for tasks with a maximum size, so that when it is full new work is rejected instead of piling up in memory.
- fake — A test double that is a small but working implementation of a dependency, such as an in-memory database standing in for a real one.
- deterministic — Always producing the same result from the same inputs, with nothing left to chance or timing.
Taught in
- WebSockets — Modern API Architecture: REST, GraphQL & gRPC
- Event-Driven Architecture And Queues — Modern API Architecture: REST, GraphQL & gRPC
- Observability: Logs, Metrics, Traces — Modern API Architecture: REST, GraphQL & gRPC
- The Queue That Forgot — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Config And Backing Services — DevOps & Site Reliability Engineering
- Disposability, Dev Prod Parity And Logs — DevOps & Site Reliability Engineering
- Deployment Strategies: Blue Green — DevOps & Site Reliability Engineering
- Asynchronous Event Processing: Outbox Pattern & Queues — Production Full-Stack Engineering
- Distributed Tracing: OpenTelemetry & Traceparent — Production Full-Stack Engineering
- Full-Stack System Verification: Capstone Integration — Production Full-Stack Engineering
- Why A Log And Not A Queue — Apache Kafka & Event Streaming
- When Kafka Is The Wrong Tool — Apache Kafka & Event Streaming
- What A Design Is For, And How To Run A Design Discussion — Scalable System Design & Distributed Architecture
- Partitioning, Sharding And Hot Keys — Scalable System Design & Distributed Architecture
- Queues, Events And Asynchronous Work — Scalable System Design & Distributed Architecture
- The Difference Between A Queue And A Log — Scalable System Design & Distributed Architecture
- Idempotency, And Exactly Once As A Fiction — Scalable System Design & Distributed Architecture
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
- Timeouts, And Avoiding Cascaded Failure — Scalable System Design & Distributed Architecture
- Backpressure And Load Shedding — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
- Capacity Planning As A Design Input — Scalable System Design & Distributed Architecture
- Worked Design One: Ticket Booking, Correctness First — Scalable System Design & Distributed Architecture
- Worked Design One: Scaling The Ticket Booking System — Scalable System Design & Distributed Architecture
- Worked Design Two: Scaling Chat Fan Out — Scalable System Design & Distributed Architecture
- Worked Design Three: A Metrics Ingestion Pipeline — Scalable System Design & Distributed Architecture
- Worked Design Three: Scaling The Metrics Pipeline — Scalable System Design & Distributed Architecture
- The Test Pyramid And Where It Is Wrong — Automated Testing, TDD & Quality Engineering
- What Test Doubles Are For — Automated Testing, TDD & Quality Engineering
- Fakes, Stubs, Mocks And Spies — Automated Testing, TDD & Quality Engineering
References
- Amazon SQS: What is Amazon SQS?
- Enterprise Integration Patterns: point-to-point channel
- RabbitMQ documentation
- AWS: what is a message queue
- RabbitMQ: Queues
- Azure Architecture Center: Queue-Based Load Leveling pattern
- RabbitMQ tutorials