CoreMesh.Outbox.Abstractions 0.1.0

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

CoreMesh.Outbox.Abstractions

Core interfaces and models for the CoreMesh Outbox pattern. Reference this package to define events and handlers without taking a dependency on any infrastructure.

Installation

dotnet add package CoreMesh.Outbox.Abstractions

Interfaces

Event Definition

Type Role
IEvent Marker interface for domain events. Requires Id and OccurredAtUtc.
EventNameAttribute Decorates an event class with its logical type name used for routing and serialization.
[EventName("order.created")]
public sealed record OrderCreatedEvent : IEvent
{
    public Guid Id { get; } = Guid.NewGuid();
    public DateTime OccurredAtUtc { get; } = DateTime.UtcNow;
    public Guid OrderId { get; init; }
}

Event Handling

Type Role
IEventHandler<TEvent> Implement to handle a specific event type.
IEventHandler Non-generic base used internally for type-erased dispatch.
IEventDispatcher Resolves and invokes the correct handler for an incoming EventEnvelope.
IEventTypeRegistry Maps event type name strings to CLR types. Populated at startup by scanning assemblies.
public class OrderCreatedHandler : IEventHandler<OrderCreatedEvent>
{
    public Task HandleAsync(OrderCreatedEvent @event, CancellationToken ct)
    {
        // handle the event
        return Task.CompletedTask;
    }
}

Outbox Write Side

Type Role
IOutboxWriter Write an event into the outbox store as part of the current unit of work.
IOutboxStore Infrastructure interface for claiming, updating, and recovering outbox messages.
OutboxMessage The persisted outbox record. Created via OutboxMessage.Create(event).
OutboxMessageStatus PendingProcessingProcessed / Failed
IOutboxWriter — Unit of Work Contract

AddAsync does not persist immediately. It participates in the caller's existing transaction. The caller is responsible for committing (e.g. DbContext.SaveChangesAsync) to guarantee atomicity.

await db.Orders.AddAsync(order, ct);
await writer.AddAsync(new OrderCreatedEvent { OrderId = order.Id }, ct);
await db.SaveChangesAsync(ct);  // both saved atomically

Message Transport

Type Role
IEventPublisher Publish an OutboxMessage to the message broker. Implement per broker.
IMessageSubscriber Subscribe to incoming messages and control Ack / Nack / Retry lifecycle.
EventEnvelope Wraps a received message with its type, payload, timestamp, and transport headers.
IMessageSubscriber — Ack / Nack / Retry Contract
Dispatch succeeded
  └─ AckAsync(envelope)   → commit broker offset, message will not be re-delivered

Dispatch failed, retries remaining
  └─ RetryAsync(envelope) → seek back broker offset, message will be re-delivered

Dispatch failed, max retries exceeded
  └─ NackAsync(envelope)  → forward to dead letter destination, commit offset
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.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CoreMesh.Outbox.Abstractions:

Package Downloads
CoreMesh.Outbox

Transactional Outbox pattern implementation for .NET. Provides background dispatching, in-memory store and channel, retry logic, zombie recovery, and a fluent DI registration API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 100 3/29/2026