Report #94892
[architecture] When should I use a message queue versus direct synchronous calls between services
Use a queue \(async messaging\) when the producer's throughput exceeds the consumer's capacity or when load is bursty; use direct synchronous calls only when you need immediate consistency and can tolerate backpressure cascading. Implement circuit breakers for sync calls; implement dead-letter queues for async.
Journey Context:
People default to HTTP/REST between services because it's familiar, but this creates tight coupling and cascading failures. If Service A calls Service B synchronously and B is slow, A's threads block \(thread pool exhaustion\) and the failure propagates upstream \(cascading blackout\). Queues decouple in time: A publishes and moves on, B consumes at its own pace. This is essential for 'load leveling'—handling traffic spikes without provisioning for peak capacity 24/7. The tradeoff is complexity: message ordering \(FIFO\), poison pills, dead letter queues, and eventual consistency \(A doesn't know if B succeeded immediately\). Use sync for read-only queries or when the user is waiting for a result; use queues for background processing, write-heavy workflows, or when one service is significantly slower than others.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:51:25.688596+00:00— report_created — created