HoneyDrunk.Data.Outbox.Dispatcher 0.7.0

dotnet add package HoneyDrunk.Data.Outbox.Dispatcher --version 0.7.0
                    
NuGet\Install-Package HoneyDrunk.Data.Outbox.Dispatcher -Version 0.7.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="HoneyDrunk.Data.Outbox.Dispatcher" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HoneyDrunk.Data.Outbox.Dispatcher" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="HoneyDrunk.Data.Outbox.Dispatcher" />
                    
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 HoneyDrunk.Data.Outbox.Dispatcher --version 0.7.0
                    
#r "nuget: HoneyDrunk.Data.Outbox.Dispatcher, 0.7.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 HoneyDrunk.Data.Outbox.Dispatcher@0.7.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=HoneyDrunk.Data.Outbox.Dispatcher&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=HoneyDrunk.Data.Outbox.Dispatcher&version=0.7.0
                    
Install as a Cake Tool

HoneyDrunk.Data.Outbox.Dispatcher

Background service that polls the transactional outbox and publishes pending messages through HoneyDrunk.Transport abstractions.

Shape

Shape A: Library with BackgroundService.

Nodes enable the dispatcher by calling AddOutboxDispatcher(). The hosted service polls the outbox, publishes through Transport, and manages retry state.

What's Inside

Type Purpose
OutboxDispatcherService BackgroundService + IOutboxDispatcher — poll / claim / publish / retry loop
OutboxDispatcherOptions Batch size, poll interval, lease duration, retry policy, default destination
AddOutboxDispatcher() DI registration extension

Design Constraints

  • Publishes via Transport interfaces onlyITransportPublisher, IEndpointAddress, ITransportEnvelope.
  • No Azure Service Bus reference — adapter-agnostic.
  • Lease-based concurrency — claims messages with a time-bound lease; crashed dispatchers recover automatically.

Integration Contract

Request Handler   ──write──>  IOutboxWriter  ──(same DB txn)──>  OutboxMessages table
                                                                        │
OutboxDispatcherService  ──poll──>  IOutboxReader  ──claim batch──>     │
                         ──publish──>  ITransportPublisher  ──>   Message Bus
                         ──mark──>  IOutboxReader.MarkDispatchedAsync()

State Machine

Pending ── ClaimBatch ──▶ Leased ── Publish OK ──▶ Dispatched
                            │
                            ├── Publish Fail (retries left) ──▶ Pending (via ReleaseForRetry)
                            └── Publish Fail (exhausted)   ──▶ DeadLetter

Guarantees

Concern Owner
Transactional persistence Data (EfOutboxWriter + UnitOfWork)
Message delivery Transport (ITransportPublisher + adapter)
Retry & backoff Dispatcher (OutboxDispatcherService)
Concurrency safety Data (EfOutboxReader CAS + lease expiry)

Setup

services.AddOutboxDispatcher(opts =>
{
    opts.PollInterval = TimeSpan.FromSeconds(10);
    opts.BatchSize = 100;
    opts.LeaseDuration = TimeSpan.FromMinutes(5);
Product Compatible and additional computed target framework versions.
.NET 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 62 5/27/2026
0.6.0 104 5/18/2026
0.5.1 103 5/4/2026
0.5.0 91 5/4/2026
0.4.0 106 4/25/2026
0.3.0 117 2/15/2026

v0.7.0: ADR-0011 D11 Sonar cleanup — IUnitOfWork<TContext> exposes ContextType DIM, CorrelationCommandInterceptor switches to a strict allow-list sanitizer, EF naming convention refactored under cognitive-complexity limit. Bumps Kernel 0.7.0→0.8.0, Vault* 0.5.0→0.7.0, Transport 0.6.0→0.7.1, Microsoft.EntityFrameworkCore* and Microsoft.Extensions.* 10.0.7→10.0.8.