Skip to content

Custom Software · Open-source build

Event-driven order system with the outbox pattern

Services that agree on what happened without sharing a database, and never lose an event between committing and publishing.

Built on
NATS
Licence
Apache-2.0
Provenance
Open-source build

What it is

Orders, payments, inventory and notifications run as separate services communicating over NATS JetStream. Each service writes its state change and its outgoing event in one transaction to an outbox table; a relay publishes from there, so a crash between the two cannot lose or duplicate a message. Consumers are idempotent by design.

What the build consists of

  1. 01Four services with their own schemas and no shared tables
  2. 02Transactional outbox and a relay with at-least-once delivery
  3. 03Idempotent consumers keyed on event identity
  4. 04Sagas for multi-step flows with explicit compensation
  5. 05OpenTelemetry traces stitched across services in Grafana Tempo
  6. 06Replay tooling: rebuild a read model from the event history

What you see in a demo

Killing the payments service mid-order and watching the order complete correctly once it returns. Then rebuilding a reporting view from scratch by replaying events.