04Hotel reservation workflow

Saga Orchestration

A reservation service coordinates room availability and payment across services, with a compensation path for rejected payments.

Reservation timeline showing a room hold, declined payment, and room release.
Concept interface

How it works

  • The reservation service orchestrates the workflow. The hotel service handles room availability and the payment service processes payment.
  • A saga state machine models both successful reservations and compensation after payment failure.
  • A transactional outbox and Debezium publish database changes. The repository documents end-to-end failure scenarios.

Technology stack

Java 21Spring BootApache KafkaDebeziumPostgreSQL