Messaging & Async
Asynchronous communication with queues and topics to decouple producers and consumers
Use queues to buffer work, smooth spikes, and decouple producers from consumers. Choose delivery semantics and handle retries and dead letters.
When tasks can be processed asynchronously, workloads are bursty, or you need to decouple microservices.
Emailing, video processing, ETL, and background jobs.
# Queue flow
queue.send(msg)
msg = queue.receive()
try:
handle(msg)
queue.ack(msg)
except:
queue.nack_to_dlq(msg)
Durable queues for async jobs
Millions of TPS across accountsAMQP-based work queues
Large on-prem and cloud fleetsAs a durable log with consumer groups
PB-scale clustersHigh - Partitioned consumption
Medium - Semantics and tuning
Low to Medium - Broker costs