Atya.Messaging.Outbox 1.0.0

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

Atya.Messaging.Outbox

Transactional outbox store and relay primitives for reliable Atya messaging.

NuGet Build

Overview

Atya.Messaging.Outbox captures messages in an outbox store through the existing IMessagePublisher<TMessage> contract, then relays pending messages through a transport publisher later. The package includes contracts, serialization helpers, an in-memory store for tests and simple hosts, and a relay that preserves message id, correlation id, headers, and runtime message type. Repeated publish failures are retried until the configured attempt budget is exhausted, then the message is marked Failed and is no longer loaded by the relay.

Entity Framework and broker-specific providers are intentionally out of scope for this package.

Installation

dotnet add package Atya.Messaging.Outbox

Quick Start

using Atya.Foundation.Time;
using Atya.Messaging.Abstractions;
using Atya.Messaging.Outbox;

var store = new InMemoryOutboxStore();
var clock = new SystemClock();
var outboxPublisher = new OutboxPublisher<OrderSubmitted>(store, clock);

await outboxPublisher.PublishAsync(
    new OrderSubmitted("order-123"),
    new MessagePublishOptions(
        messageId: "message-123",
        correlationId: "correlation-123"));

IMessagePublisher transportPublisher = /* adapter implemented by a transport package */;
var relay = new OutboxRelay(store, transportPublisher, clock, maxAttempts: 3);
OutboxRelayResult result = await relay.PublishPendingAsync(maxCount: 100);

public sealed record OrderSubmitted(string OrderId);

Public Surface

  • IOutboxStore stores pending messages and records publish outcomes. Durable implementations must participate in the caller's transaction.
  • OutboxMessage represents a serialized message, metadata, status, and retry state.
  • OutboxMessageStatus has Pending, Published, and terminal Failed states.
  • OutboxMessageSerializer serializes MessageEnvelope<TMessage> values and restores runtime payloads from assembly-qualified type names using Atya Foundation serialization defaults unless options are supplied.
  • OutboxPublisher<TMessage> implements IMessagePublisher<TMessage> by writing to the outbox.
  • OutboxRelay republishes pending outbox messages through the type-erased IMessagePublisher contract and marks messages terminally failed after maxAttempts.
  • InMemoryOutboxStore provides an in-memory implementation for tests, samples, and simple hosts.

Testing

dotnet test

Benchmarks

dotnet run -c Release --project benchmarks/Outbox.Benchmarks

License

MIT. See LICENSE.

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
1.0.0 272 7/13/2026