Skip to content
Ameen Abozaid
Planned lessonMID-031-L07

Demo: the order saga, happy path

  • Lesson 7 of 8
  • Mid-level
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

build and run the orchestrated order saga. Prepares MID-031-LAB1.

Draft outline details

Step by step

  1. Show the saga table and the OrderSaga state machine inside orders.
  2. POST /orders creates the order PENDING and a saga row, and writes a ReserveStock command via the outbox.
  3. inventory replies StockReserved; the orchestrator moves to STOCK_RESERVED and sends AuthorizePayment.
  4. Planned mistake: handle StockReserved without checking the current state; replay the reply and the saga re-sends the payment command. Fix: ignore replies unless the state matches, plus inbox dedup.
  5. payments replies PaymentAuthorized; order becomes CONFIRMED, saga COMPLETED.
  6. Show the trace by correlation id across the three services.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.