Communication & APIs
Also known as: Queue, Job Queue
A buffer that holds messages between producers and consumers, enabling asynchronous processing and decoupling of services.
A message queue accepts messages from producers, durably stores them, and delivers them to consumers. The queue absorbs bursts (producers can publish faster than consumers can process), decouples services (producers and consumers can deploy and scale independently), and adds reliability (a message persists in the queue until processed and acknowledged).
Classic queueing semantics are point-to-point: each message is consumed by exactly one worker. SQS, RabbitMQ, ActiveMQ, and Beanstalkd are common implementations. Pub/sub is the related broadcast pattern where a message is delivered to every subscriber. Kafka and Pulsar combine both with append-only logs and consumer groups, providing replayable streams that scale to millions of messages per second.
Queues are the workhorse of background jobs, asynchronous workflows, and event-driven architectures. They turn a synchronous request-response into "accept the request, queue the work, ack later" — improving response times and isolating failures.
Use a queue for any work that is slow, expensive, or can be done after the user response: sending email, generating PDFs, video transcoding, indexing, analytics events.
Queues introduce eventual consistency (the work happens later), require idempotent consumers (messages can be redelivered), and add a critical piece of infrastructure to operate. Dead-letter queues and retry strategies must be designed thoughtfully.
A messaging pattern where publishers emit messages to topics without knowing who consumes them, and subscribers receive messages from topics they care about.
A property of operations such that performing them multiple times has the same effect as performing them once — essential for safe retries.
An architectural style for web APIs based on HTTP verbs (GET, POST, PUT, DELETE) acting on resources identified by URLs.
A high-performance RPC framework using HTTP/2, Protocol Buffers, and code generation for type-safe, low-latency service-to-service communication.
A query language for APIs that lets clients request exactly the fields they need in a single request, eliminating over- and under-fetching.
A persistent, bidirectional communication channel between client and server over a single TCP connection — the standard for real-time web features.