.NET Architecture & System Design Interview Question #39
What is a message queue?
Caching, CDN, Queues & Asynchronous Processing Junior Beginner
Quick Interview Answer
A message queue stores messages until consumers are able to process them. It decouples producers from consumers in time and can absorb temporary differences between production and processing rates.
Detailed Explanation
A message queue stores messages until consumers are able to process them. It decouples producers from consumers in time and can absorb temporary differences between production and processing rates.
Queues can improve resilience and smooth traffic spikes, but they introduce eventual processing, duplicate-delivery concerns, monitoring requirements, and the need to manage failed messages.
Code Example
Producer -> Queue -> Consumer
|
durable buffer