OpinionatedEventing.Outbox 0.9.0

dotnet add package OpinionatedEventing.Outbox --version 0.9.0
                    
NuGet\Install-Package OpinionatedEventing.Outbox -Version 0.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpinionatedEventing.Outbox" Version="0.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpinionatedEventing.Outbox" Version="0.9.0" />
                    
Directory.Packages.props
<PackageReference Include="OpinionatedEventing.Outbox" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpinionatedEventing.Outbox --version 0.9.0
                    
#r "nuget: OpinionatedEventing.Outbox, 0.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpinionatedEventing.Outbox@0.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpinionatedEventing.Outbox&version=0.9.0
                    
Install as a Cake Addin
#tool nuget:?package=OpinionatedEventing.Outbox&version=0.9.0
                    
Install as a Cake Tool

OpinionatedEventing.Outbox

Outbox dispatcher background service for OpinionatedEventing. All outbound messages are written to IOutboxStore within the caller's SaveChanges transaction, then delivered to the broker asynchronously by OutboxDispatcherWorker. This guarantees at-least-once delivery without dual-write risk.

Installation

dotnet add package OpinionatedEventing.Outbox

Pair with an outbox store implementation:

dotnet add package OpinionatedEventing.EntityFramework

Registration

builder.Services
    .AddOpinionatedEventing()
    .AddOutbox();

AddOutbox registers:

  • IPublisherOutboxPublisher (scoped) — writes to the outbox store
  • OutboxDispatcherWorker — hosted service that polls and dispatches

How it works

  1. Your code calls IPublisher.PublishEventAsync or SendCommandAsync inside a unit of work.
  2. OutboxPublisher writes OutboxMessage records to IOutboxStore within the same transaction.
  3. OutboxDispatcherWorker picks up pending messages and forwards them to the configured transport.
public class PlaceOrderHandler : ICommandHandler<PlaceOrder>
{
    private readonly AppDbContext _db;
    private readonly IPublisher _publisher;

    public async Task HandleAsync(PlaceOrder command, CancellationToken ct = default)
    {
        var order = new Order(command.OrderId);
        _db.Orders.Add(order);
        await _publisher.PublishEventAsync(new OrderPlaced(order.Id), ct);
        await _db.SaveChangesAsync(ct); // outbox write is part of this transaction
    }
}

Repository

github.com/SierraNL/OpinionatedEventing

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on OpinionatedEventing.Outbox:

Package Downloads
OpinionatedEventing.EntityFramework

EF Core integration for OpinionatedEventing — IOutboxStore implementation, domain event interceptor, and saga state persistence.

OpinionatedEventing.RabbitMQ

RabbitMQ transport for OpinionatedEventing. Events map to topic exchanges, commands map to direct queues. Supports Aspire service discovery and auto-declare topology.

OpinionatedEventing.Testing

Test helpers for OpinionatedEventing — InMemoryOutboxStore, FakePublisher, FakeMessagingContext, and TestMessagingBuilder for unit testing without infrastructure.

OpinionatedEventing.AzureServiceBus

Azure Service Bus transport for OpinionatedEventing. Events map to topics, commands map to queues. Supports DefaultAzureCredential and auto-resource creation.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.0 151 5/8/2026