Scalability and Performance · Queues and flow control
Message queues
A message queue holds messages from producers until a consumer acknowledges them. Delivery is usually at-least-once, so consumers must be idempotent, and messages that keep failing need a dead-letter queue.
- Time22 min
- LevelDeveloper
- Experiments1 live
- Check6 questions






Producer sends "send welcome email, user 42" and moves on.
Consumer receives it; the broker hides it from other consumers.
Consumer checks the message ID is new, then sends the email.
Consumer acknowledges; the broker deletes the message.
Effectively-once at-least-once delivery plus a consumer that ignores duplicates.
At-most-once ack before processing; no duplicates, messages can be lost.