Trellis.EntityFrameworkCore.Inbox 3.0.0-alpha.582

This is a prerelease version of Trellis.EntityFrameworkCore.Inbox.
dotnet add package Trellis.EntityFrameworkCore.Inbox --version 3.0.0-alpha.582
                    
NuGet\Install-Package Trellis.EntityFrameworkCore.Inbox -Version 3.0.0-alpha.582
                    
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="Trellis.EntityFrameworkCore.Inbox" Version="3.0.0-alpha.582" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Trellis.EntityFrameworkCore.Inbox" Version="3.0.0-alpha.582" />
                    
Directory.Packages.props
<PackageReference Include="Trellis.EntityFrameworkCore.Inbox" />
                    
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 Trellis.EntityFrameworkCore.Inbox --version 3.0.0-alpha.582
                    
#r "nuget: Trellis.EntityFrameworkCore.Inbox, 3.0.0-alpha.582"
                    
#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 Trellis.EntityFrameworkCore.Inbox@3.0.0-alpha.582
                    
#: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=Trellis.EntityFrameworkCore.Inbox&version=3.0.0-alpha.582&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Trellis.EntityFrameworkCore.Inbox&version=3.0.0-alpha.582&prerelease
                    
Install as a Cake Tool

Trellis.EntityFrameworkCore.Inbox

NuGet Package

Transactional inbox for idempotent integration-event consumption with EF Core.

The inbox records (ConsumerId, MessageId) in the same unit of work as a handler's local writes, turning transport redelivery into effectively-once application of those effects.

This package opts out of NativeAOT and trimming because it builds on EF Core and resolves handlers by event type at dispatch time.

Installation

dotnet add package Trellis.EntityFrameworkCore.Inbox

Quick Example

protected override void OnModelCreating(ModelBuilder modelBuilder) =>
    modelBuilder.AddTrellisInbox();

services.AddTrellis(trellis => trellis
    .UseIntegrationEvents(typeof(Program).Assembly)
    .UseEntityFrameworkUnitOfWork<AppDbContext>()
    .UseInbox<AppDbContext>(options =>
        options.ConsumerId = "orders-service"));

Your transport adapter passes each received event to IInboxDispatcher.DispatchAsync(...) using the producer's stable message ID.

UseIntegrationEvents(...) supplies handler bindings shared by the inbox and the default best-effort local publisher. UseInbox<TContext>() does not route that publisher through the inbox: its swallowed consumer failures still process integration outbox rows without retry. The adapter must actually invoke the non-swallowing inbox dispatcher and expose failures for transport redelivery. Broker publication acceptance alone is not consumer processing.

Key Features

  • Commits the deduplication row and handler writes atomically in one DbContext.
  • Returns Processed or SkippedDuplicate so transports can settle both outcomes.
  • Propagates handler failures so the transaction rolls back and the transport redelivers.
  • Rejects new messages with no registered handler without committing their dedup row.
  • Restores inbound business correlation and W3C trace context during handlers and their atomic commit.
  • Uses a composite (ConsumerId, MessageId) key as the concurrency guard.
  • Supports anti-join filtering and optional pull-consumer checkpoints.

Keep ConsumerId stable across deployments and carry the producer's outbox row ID unchanged as MessageId. External calls are outside the inbox transaction and require their own idempotency. The built-in EF dispatcher requires its matching EF store; pair a custom IInboxStore with a custom dispatcher that owns the same unit of work.

Operations

The inbox retains committed metadata, not payloads or failed attempts. Trellis ships no inbox maintenance facade, automatic expiry job, or replay coordinator. Inspection is application-owned, bounded, and storage/consumer-scoped; a missing row is not proof that a message never ran.

Pruning is opt-in only after bounding all redelivery/replay sources. Transport redrive keeps the original identity. Replaying consumed messages requires a separate stable ConsumerId and isolated rebuild storage/effects, with original message IDs and versioned payloads supplied by an application-owned durable log/archive; live dedup rows remain intact. See the operational requirements.

No inbox-table health check is shipped: receipts and checkpoint timestamps cannot establish source lag or consumer liveness. The outbox package's optional readiness stage accepts explicitly enabled, fresh IConsumerLagProvider evidence scoped to storage, consumer, source, and required partitions; unconfigured is disabled, not observed healthy. See the consumer-lag requirements and linked opt-in readiness API.

Documentation

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 (1)

Showing the top 1 NuGet packages that depend on Trellis.EntityFrameworkCore.Inbox:

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.582 72 10/19/2026
3.0.0-alpha.574 87 10/14/2026
3.0.0-alpha.571 62 10/13/2026
3.0.0-alpha.557 96 10/8/2026
3.0.0-alpha.554 62 10/8/2026
3.0.0-alpha.553 61 10/7/2026
3.0.0-alpha.542 117 10/5/2026
3.0.0-alpha.539 77 10/4/2026
3.0.0-alpha.532 70 10/2/2026
3.0.0-alpha.527 62 10/1/2026
3.0.0-alpha.526 64 9/30/2026
3.0.0-alpha.524 66 9/27/2026
3.0.0-alpha.520 76 9/25/2026
3.0.0-alpha.516 165 9/22/2026
3.0.0-alpha.513 70 9/22/2026
3.0.0-alpha.505 79 9/13/2026
3.0.0-alpha.495 141 8/24/2026
3.0.0-alpha.458 119 8/19/2026
3.0.0-alpha.455 135 8/19/2026
3.0.0-alpha.449 81 8/18/2026
Loading failed