Skip to content

Add lightweight transactional outbox sample - #3

Merged
balajibashyam merged 3 commits into
mainfrom
feature/transactional-outbox-sample
Jul 28, 2026
Merged

Add lightweight transactional outbox sample#3
balajibashyam merged 3 commits into
mainfrom
feature/transactional-outbox-sample

Conversation

@balajibashyam

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal .NET 10 companion sample for the Transactional Outbox Pattern in .NET with EF Core (.NET 10): Fix the Dual-Write Problem tutorial.

What's included

  • New sample: distributed-systems/transactional-outbox-ef-core/ — 14 files

    • Creates an Order and OutboxMessage in one atomic SaveChangesAsync
    • Relays pending outbox rows via a one-shot OutboxRelay
    • Uses InMemoryPublisher for deterministic demonstration
    • 3 xUnit v3 tests: atomic write, relay processing, no duplicate dispatch
    • Console program with deterministic count-based output
    • SQLite (no Docker, PostgreSQL, or RabbitMQ required)
  • Root README: New sample row in the table + updated repository structure

  • GitHub Actions: New test-transactional-outbox job in the shared workflow; path filters updated

Deliberately omitted (stays in the full tutorial)

ASP.NET Core API endpoints, PostgreSQL, Npgsql, RabbitMQ, Docker Compose, broker SDKs, a separate consumer application, inbox tables, duplicate-consumer handling, concurrent dispatchers, FOR UPDATE SKIP LOCKED, SQL Server locking hints, SaveChangesInterceptor, aggregate domain-event infrastructure, EF Core execution-strategy demonstrations, broker retries, poison-message quarantine, dead-letter storage, exponential backoff, OpenTelemetry, trace propagation, health checks, push-then-poll signaling, channels, change data capture, Debezium, migrations, Testcontainers, production secrets, deployment, library comparisons.

Versions

  • .NET SDK: 10.0.302
  • Microsoft.EntityFrameworkCore: 10.0.10
  • Microsoft.EntityFrameworkCore.Sqlite: 10.0.10
  • xunit.v3: 3.2.2

Validation

  • dotnet restore — passed
  • dotnet build --configuration Release — passed (0 errors)
  • dotnet test --configuration Release — passed (3/3)
  • dotnet run — passed (console output matches expected)
  • Security scan — clean

@balajibashyam
balajibashyam merged commit 6bb690b into main Jul 28, 2026
5 checks passed
@balajibashyam
balajibashyam deleted the feature/transactional-outbox-sample branch July 28, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant