Skip to main content

Runnable samples

Clone the repository and use the .NET SDK selected by global.json. Each sample references the library and source generator projects directly rather than the published NuGet packages. dotnet build -c Release at the repository root builds these samples with the solution.

SampleRun from repository rootExpected result
Modular monolithdotnet run -c Release --project samples/ModularMonolithPrints an invoice and exits after billing handles the event
Kafka and EF Core outboxdotnet run -c Release --project samples/KafkaEfOutbox -- --urls http://localhost:5081POST /orders/order-1 commits business data and an event, then a Kafka consumer logs it
Service Bus web APIdotnet run -c Release --project samples/ServiceBusWebApi -- --urls http://localhost:5082POST /orders/order-1 sends to a queue and a hosted handler logs receipt

Read each linked README before running. The Kafka example needs PostgreSQL, externally created source/dead-letter topics and connection settings. It initializes an empty demonstration database, registers unordered direct dispatch and maintenance recovery, and makes no exactly-once claim. The Service Bus example needs an existing non-session queue and a namespace or emulator connection string with Send and Listen rights. It validates topology without creating it.

The getting started call site follows the modular monolith. Transport-specific details stay in the Kafka and Service Bus guides; persistence details stay in EF enlistment, direct dispatch and recovery. The existing Aspire guide covers the separate orchestration/health sample.