Trellis.EntityFrameworkCore.Outbox
3.0.0-alpha.571
See the version list below for details.
dotnet add package Trellis.EntityFrameworkCore.Outbox --version 3.0.0-alpha.571
NuGet\Install-Package Trellis.EntityFrameworkCore.Outbox -Version 3.0.0-alpha.571
<PackageReference Include="Trellis.EntityFrameworkCore.Outbox" Version="3.0.0-alpha.571" />
<PackageVersion Include="Trellis.EntityFrameworkCore.Outbox" Version="3.0.0-alpha.571" />
<PackageReference Include="Trellis.EntityFrameworkCore.Outbox" />
paket add Trellis.EntityFrameworkCore.Outbox --version 3.0.0-alpha.571
#r "nuget: Trellis.EntityFrameworkCore.Outbox, 3.0.0-alpha.571"
#:package Trellis.EntityFrameworkCore.Outbox@3.0.0-alpha.571
#addin nuget:?package=Trellis.EntityFrameworkCore.Outbox&version=3.0.0-alpha.571&prerelease
#tool nuget:?package=Trellis.EntityFrameworkCore.Outbox&version=3.0.0-alpha.571&prerelease
Trellis.EntityFrameworkCore.Outbox
Transactional outbox and post-commit domain-event dispatch for EF Core applications built with Trellis.
It captures domain events in the aggregate transaction and relays them after commit. Translators can then stage durable integration rows; publication guarantees depend on the configured publisher.
This package opts out of NativeAOT and trimming because it builds on EF Core and discovers integration-event types at runtime.
Installation
dotnet add package Trellis.EntityFrameworkCore.Outbox
Quick Example
protected override void OnModelCreating(ModelBuilder modelBuilder) =>
modelBuilder.AddTrellisOutbox();
builder.Services.AddDbContext<AppDbContext>(options =>
options.UseNpgsql(connectionString)
.AddTrellisInterceptors()
.AddTrellisOutboxInterceptor());
builder.Services.AddTrellis(trellis => trellis
.UseDomainEvents(typeof(Program).Assembly)
.UseIntegrationEvents(typeof(Program).Assembly)
.UseEntityFrameworkUnitOfWork<AppDbContext>()
.UseOutbox<AppDbContext>());
Translate domain events into integration events by adding them to IIntegrationEventCollector from a domain-event handler.
Key Features
- Captures domain-event rows in the same transaction as aggregate changes.
- Persists optional W3C trace context and business lineage on domain rows and translated integration rows.
- Dispatches domain events only after a successful commit.
- Publishes pending integration events through a resilient background service.
- Supports configurable batching, locking, lease recovery, retry scheduling, and dead-lettering.
- Exposes an explicit retryability contract for publisher failures.
- Requires no broker dependency; transport packages implement
IIntegrationEventPublisher.
Delivery Semantics
Domain rows use reporting dispatch to retry failed domain handlers, skipping saved completed-handler progress. Integration rows have one publisher handoff, not per-consumer retry progress. Default local fan-out is best-effort: ordinary consumer failures are logged and swallowed, so a new row is processed with Attempts == 0 and no relay LastError, and those consumers are not retried.
Broker adapters must await publication acceptance and propagate publication failures. An exposed non-cancellation failure keeps the row pending with an incremented failure count, retained error, and retry under the same message id. Acceptance is not consumer success. Transactional consumption requires an adapter to invoke the non-swallowing inbox and expose failures for transport redelivery; inbox registration does not reroute default local publication.
All three wiring steps are required: map the table, register AddTrellisOutboxInterceptor() for capture, and register the relay. Let the unit-of-work pipeline own SaveChangesAsync(). Carry OutboundIntegrationMessage.MessageId unchanged as the transport message ID so inbox consumers can deduplicate end to end.
The alpha outbox schema includes nullable MessageSource, CausationId, CorrelationId, TraceParent, and TraceState columns; no migration or backfill is provided. Use IntegrationMessageContext.BeginCorrelation("workflow-id") to supply an application-owned business correlation id; one is never inferred from the trace.
Health Requirements
Not implemented: no Trellis-specific outbox/inbox health checks or health registrations
are shipped. The staged readiness requirements
separate pending/parked summaries, local relay responsiveness, durable capture-age
evidence, and optional consumer lag. The reference profile requires explicit selection
and tuning; OccurredAt is not queue age, and publisher acceptance is not consumer success.
Readiness probes must not mutate delivery state or trigger automatic restarts.
Documentation
| Product | Versions 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. |
-
net10.0
- Mediator.Abstractions (>= 3.0.2)
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- OpenTelemetry.Api (>= 1.19.1)
- Trellis.EntityFrameworkCore (>= 3.0.0-alpha.571)
- Trellis.Mediator (>= 3.0.0-alpha.571)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Trellis.EntityFrameworkCore.Outbox:
| Package | Downloads |
|---|---|
|
Trellis.ServiceDefaults
Opinionated service composition defaults for Trellis web services. Provides a tiered builder that wires ASP integration, Mediator behaviors, FluentValidation, resource authorization, actor providers, and EF Core Unit of Work in canonical order. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-alpha.574 | 47 | 10/14/2026 |
| 3.0.0-alpha.571 | 46 | 10/13/2026 |
| 3.0.0-alpha.557 | 86 | 10/8/2026 |
| 3.0.0-alpha.554 | 58 | 10/8/2026 |
| 3.0.0-alpha.553 | 51 | 10/7/2026 |
| 3.0.0-alpha.542 | 107 | 10/5/2026 |
| 3.0.0-alpha.539 | 60 | 10/4/2026 |
| 3.0.0-alpha.532 | 64 | 10/2/2026 |
| 3.0.0-alpha.527 | 61 | 10/1/2026 |
| 3.0.0-alpha.526 | 55 | 9/30/2026 |
| 3.0.0-alpha.524 | 66 | 9/27/2026 |
| 3.0.0-alpha.520 | 69 | 9/25/2026 |
| 3.0.0-alpha.516 | 156 | 9/22/2026 |
| 3.0.0-alpha.513 | 64 | 9/22/2026 |
| 3.0.0-alpha.505 | 71 | 9/13/2026 |
| 3.0.0-alpha.495 | 141 | 8/24/2026 |
| 3.0.0-alpha.458 | 115 | 8/19/2026 |
| 3.0.0-alpha.455 | 137 | 8/19/2026 |
| 3.0.0-alpha.449 | 83 | 8/18/2026 |
| 3.0.0-alpha.447 | 89 | 8/18/2026 |