Message queues
Your email service keeps pending emails in memory. It crashes during a deploy, and 2,000 sign-up emails vanish. Nobody notices for a week. A message queue exists so that work survives crashes, waits its turn and gets done by whoever is free.
In this lesson you'll learn to
- Describe a message queue's parts (producer, queue, consumer, broker) and why it decouples them.
- Explain acknowledgements and the visibility timeout, and why they mean a message can be delivered twice.
- Use retries with a limit and a dead-letter queue to handle messages that keep failing.
- Scale consumers with competing consumers, and explain the ordering and durability trade-offs of standard and FIFO queues.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.