Decouple producers from consumers with a durable buffer so spikes get absorbed and slow work happens asynchronously.
Plain English: instead of Service A calling Service B directly and waiting, A drops a message in a queue and moves on. B picks it up whenever it's ready. This soaks up traffic spikes, survives B being down for a while, and lets slow work happen in the background.
A durable, intermediary buffer that decouples producers (who enqueue messages) from consumers (who dequeue and process them). Classic brokers (RabbitMQ, SQS) deliver-then-delete per message; log-based systems (Kafka) keep an ordered, replayable log that consumers read by offset. Both let work happen asynchronously and absorb load.
Synchronous coupling is fragile: if A calls B directly and B is slow or down, A blocks or fails. A queue breaks that link: A enqueues and continues, B processes at its own pace. Queues also absorb bursts (a traffic spike fills the queue instead of melting the consumer), enable async work (resize the image after the upload returns), and let you scale consumers independently of producers.
Producers publish messages to a queue or topic. The broker persists them (so they survive a crash). Consumers pull (or are pushed) messages, process them, and acknowledge. Unacked messages are redelivered (at-least-once delivery). Failed messages eventually land in a dead-letter queue. Log-based brokers like Kafka instead keep messages on disk by offset, letting multiple consumer groups read the same stream and replay history.
Messages to offline users are queued per-recipient and delivered when the device reconnects
Send requests are enqueued and workers fan them out to providers, retrying failures and dead-lettering the dead ones
The log-based queue itself: partitioned, replicated, replayable, consumed by independent consumer groups