Skip to content

Lecture 03. Asynchronous communication with RabbitMQ ​

Week 5 · Syllabus and preparation from the course outline; no study date or personal lecture notes have been recorded.

Business scenario ​

Checkout now involves slower payment and notification work; the API should accept the order without waiting for all downstream tasks.

Topics to cover in this class ​

  1. Synchronous requests, asynchronous events, queues and event-driven architecture
  2. RabbitMQ exchanges, queues, bindings, routing keys and consumer groups
  3. Event envelopes, event_id/correlation_id, message lifecycle and state transitions
  4. Manual acknowledgements, requeue, publisher confirms and dead-letter behavior
  5. At-least-once delivery, duplicate deliveries and failure-safe consumers

Learning objectives ​

  • Trace an order across API, message broker and payment worker.
  • Demonstrate redelivery after a worker crash.
  • Explain why broker ACK is not exactly-once business execution.

Live demonstration checklist ​

  • Place an order returning 202, then observe asynchronous transition to terminal status.
  • Interrupt payment worker before ACK; restart and inspect redelivered message.

Preparation and optional written reflection (ungraded) ​

Reading focus: Read RabbitMQ confirms/acknowledgements documentation; identify the difference between publisher confirm and consumer acknowledgement. Optional individual reflection: A worker updates a database but crashes before acknowledging a message. What can happen next?

Study materials: official docs, websites and YouTube ​

Built with VitePress · Notes © 2026 [Your Name]