Outbox Installation
Prerequisites
- .NET 8 or later
- Entity Framework Core 8+ (recommended for the EF Core integration)
- A message broker (RabbitMQ, Azure Service Bus, etc.) for the relay to publish to
Package Installation
Step 1: Install the Core Outbox Package
The core package provides the outbox channel, relay service, and base contracts:
dotnet add package Hermodr.Publisher.Outbox
Step 2: Install Entity Framework Core Integration (Recommended)
The EF Core package provides ready-made implementations that eliminate most boilerplate:
dotnet add package Hermodr.Publisher.Outbox.EntityFramework
Step 3: Install Your Database Provider
Choose the EF Core provider for your database:
# SQL Server
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
# PostgreSQL
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL
# SQLite (for development/testing)
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
# MySQL
dotnet add package Pomelo.EntityFrameworkCore.MySql
Package Overview
| Package | Purpose | Required |
|---|---|---|
Hermodr.Publisher.Outbox | Core outbox channel and relay service | ✅ Yes |
Hermodr.Publisher.Outbox.EntityFramework | EF Core entity, repository, and extensions | ✅ Recommended |
Microsoft.EntityFrameworkCore.* | Database provider | ✅ For EF Core integration |
What's Included
Core Package (Hermodr.Publisher.Outbox)
OutboxPublishChannel<TMessage>— Channel that persists events instead of sending directlyIOutboxMessage— Contract for outbox message entitiesIOutboxMessageFactory<TMessage>— Creates outbox records fromCloudEventinstancesIOutboxMessageStore<TMessage>— Repository for persisting and querying outbox recordsOutboxRelayService— Background service that polls and forwards pending messagesOutboxMessageStatus— Enum tracking delivery lifecycle (Pending,Sending,Delivered,Failed)
EF Core Package (Hermodr.Publisher.Outbox.EntityFramework)
DbOutboxMessage— Ready-to-useIOutboxMessageimplementation with EF mappingsEntityOutboxMessageRepository<TMessage>— EF Core repository implementationOutboxDbContext— MinimalDbContextwith outbox entity configuredWithEntityFramework()— Fluent extension that wires all EF components in one callAddEntityFrameworkOutbox()— Convenience method combining outbox + EF registration
Next Steps
After installation, proceed to:
- Components — Learn about the outbox contracts (entity, factory, store)
- EF Core Integration — Set up the ready-made EF implementation
- Registration — Wire everything up in your application