Systems

Services that run. Distributed transactions, message brokers and the failure modes that come with them.

Run the saga

TripSaga in miniature. The orchestrator sends a command, waits for the reply event, then advances. Break it at any step and watch every step that already succeeded get reversed — that is the whole point of a saga.

Idle
Orchestrator durable state machine
Flight flight-service
Hotel hotel-service
Payment payment-service

Teaching

Repositories built to be read. Each one is a runnable answer to a question I kept getting asked.

Move a message

The broker from spring-rabbitmq, in miniature. Turn confirms off and the publisher stops learning whether the broker ever had the message. Crash the consumer and nothing is lost — it comes back, three times, and then the dead letter exchange takes it.

Idle
Producer order-service
Exchange orders · topic
Queue orders.q depth 0
Consumer orders-1 attempt —
Dead letter orders.dlq

Throw something

The error handling from exception-handling, in miniature. The request descends the layers, something throws, the frames unwind untouched — no try/catch anywhere — and one @ControllerAdvice turns whatever arrived into an RFC 9457 ProblemDetail. Change the exception and only the response changes.

Idle
CustomerController @RestController
CustomerService @Service
CustomerRepository ListCrudRepository
GlobalExceptionHandler @ControllerAdvice