Storefront
Synchronously calls the order service to create an order.
Synthetic Technical Case
Arrows indicate layer grouping only. Node text defines specific dependencies, event routes, and data ownership.
Synchronously calls the order service to create an order.
Synchronously calls the callback service with a callback ID.
Order service: writes Order DB; publishes OrderCreated asynchronously; consumes PaymentConfirmed, committing payment status and consumed event ID together.
Callback service: writes Callback DB; acknowledges after commit; deduplicates by callback ID; publishes PaymentConfirmed asynchronously.
Inventory consumer: receives OrderCreated asynchronously; commits reservation and consumed event ID together.
PostgreSQL; only the order service reads and writes it. Order and outbox commit together; stores consumed event IDs.
Separate PostgreSQL; only the callback service reads and writes it. Callback ID and outbox commit together.
Separate PostgreSQL; only the inventory consumer reads and writes it. Stores reservations and consumed event IDs.
At-least-once delivery. OrderCreated → inventory consumer; PaymentConfirmed → order service.