Follow one purchase order from synchronous SKU snapshotting to atomic Outbox persistence, O(1) topic routing over System.Threading.Channels, deterministic FOR UPDATE stock locking, idempotent Inbox fan-out, and OpenTelemetry verification.
LIVE SAGA & OTEL TRACESnapshot SKUs via Catalog PublicApi
Orders never queries catalog.products directly. PlaceOrderCommandHandler calls ICatalogPublicApi in-process to verify active SKUs and snapshot unit prices before opening a database transaction—keeping Catalog free to change prices later without mutating historical orders.
Buyer HTTP Request↓ POST /api/ordersOrders Module
↓ Snapshot SKU & price via ICatalogPublicApiCatalog.PublicApi
Inside OrdersDbContext, InsertOutboxMessagesInterceptor captures OrderPlacedDomainEvent alongside Activity.Current?.Id (W3C trace_parent) in orders.outbox_messages within the exact same PostgreSQL commit, then pulses OutboxWakeupSignal for sub-10ms dispatch.
Orders Module↓ Commit Order + OutboxMessage + trace_parentOutbox + trace_parent
ModuleOutboxProcessor publishes OrderPlacedIntegrationEvent to Orbit.Common.EventBus. TopicSubscriptionRegistry looks up orders.order-placed in O(1) via an immutable FrozenDictionary and writes only to subscribed bounded Channel<IntegrationEventEnvelope> queues.
Inventory wraps its handler in IdempotentIntegrationEventHandler and executes SELECT *, xmin FROM inventory.stock_items ... ORDER BY product_id FOR UPDATE. When five buyers race for the last unit, PostgreSQL serializes the lock: one order wins reservation and four receive StockRejected.
Orbit.EventBus (Channels)↓ Route orders.order-placed in O(1)Inventory Module
↓ SELECT *, xmin FOR UPDATE in sorted orderinventory.stock_items
OrderStockReservedIntegrationEvent fans out across two independent bounded channels: Orders transitions the purchase order to Confirmed while Shipments creates a Pending warehouse pick-list. Each module records its own inbox_message_consumers receipt atomically.
49 automated guardrails inspect .csproj graphs, NetArchTest layer rules, EF Core snake_case schemas, and raw Dapper SQL strings in under two seconds—while Aspire Dashboard (:18888) renders the full multi-module OpenTelemetry waterfall for both humans and AI coding agents.
AI Coding Agent↓ Load task-specific SKILL.md playbook.agents/skills/*
↓ Run 5-second zero-warning + SQL boundary gate49 Architecture Tests
↓ Inspect live W3C distributed spansAspire OTel Dashboard