Rask.Outbox 0.24.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Rask.Outbox --version 0.24.0
                    
NuGet\Install-Package Rask.Outbox -Version 0.24.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="Rask.Outbox" Version="0.24.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.Outbox" Version="0.24.0" />
                    
Directory.Packages.props
<PackageReference Include="Rask.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 Rask.Outbox --version 0.24.0
                    
#r "nuget: Rask.Outbox, 0.24.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 Rask.Outbox@0.24.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=Rask.Outbox&version=0.24.0
                    
Install as a Cake Addin
#tool nuget:?package=Rask.Outbox&version=0.24.0
                    
Install as a Cake Tool

Rask.Outbox

A transactional outbox for Rask.Data aggregates. It runs a handler durably, on the app's own database, with no broker or Redis.

  • Give a handler IDurableHandler<T> and the event is written to an OutboxMessage table in the same transaction as the change that raised it. It is never lost, and it never fires for a change that rolled back. Plain IEventHandler<T>s of the same event keep running in memory; each handler chooses.
  • A background OutboxProcessor is woken by every save that wrote rows and runs each row's handler, at least once, with retries and an attempt count. Each durable handler is its own row, retried on its own.
  • Published messages are purged after Retention (default 7 days) so the table doesn't grow forever. Dead letters are never purged, because they have no ProcessedAt for the predicate to match.
  • Metrics on the Rask.Outbox meter: processed / failed / dead-lettered counters, a duration histogram, and pending / dead-letter gauges. rask.outbox.deadletters is the one to alert on.

Use

[LocalOnly]                                                    // only the server says a sale happened
public sealed record OrderPlaced(Guid Id) : IEvent;           // raised on your aggregate

public sealed class SendReceipt : IDurableHandler<OrderPlaced>
{
    public Task Handle(OrderPlaced e) => …;                    // through the outbox: atomic, retried
}

// Program.cs
builder.Services.AddRaskCqrs();
builder.Services.AddRaskOutbox<AppDbContext>(o => o.PollInterval = 5.Seconds);

builder.Services.AddDbContextFactory<AppDbContext>((sp, o) => o
    .UseSqlite("Data Source=app.db")
    .AddInterceptors(sp.GetServices<ISaveChangesInterceptor>()));

// AppDbContext.OnModelCreating
modelBuilder.AddRaskOutbox(); // maps the OutboxMessage table

In a multi-tenant app each message records the tenant the change was saved in, and the processor re-enters it before running the handler, so a handler reading a tenant-scoped table sees that tenant. The user travels the same way (Current.UserId), and Jobs.Enqueue(…) or Mail.Send(…) work inside a handler. OutboxMessage.Where(…) queries the table with no context of your own.

Server-side. The processor is a hosted BackgroundService and the store is your EF Core database (SQLite by default). Part of the Rask framework. MIT licensed.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Rask.Outbox:

Package Downloads
Rask.Server

The ASP.NET host for Rask, a full-stack .NET web framework, with every battery: database (SQLite or SQL Server, and PostgreSQL with the Rask.Postgres package, picked by Rask:Database:Provider), mediator and query cache, accounts, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, SQLite snapshots and continuous backup. Renders Rask components with live updates over a WebSocket. RaskApp.Create(args).Run<App>() is the whole Program.cs, and RaskApp.Create(args).Serve() the whole server of a WebAssembly client; app.Configure(c => c.Jobs.Off()) is how an app does without one. Depends on Rask, the shared core.

Rask.Dashboard

A built-in operator dashboard for the Rask One Person Framework batteries. Mounts at /_rask and shows the outbox, background jobs, queued mail, cache and stored files from the application's own database — queue depth, dead letters, the errors behind them, stored email previews, the recurring-job schedule, SQLite pragmas and backup status. A live log tail is built in, and becomes a searchable history when Rask.Logging is installed. Panels appear only for the batteries the app actually registered. Protected by an authorization policy that fails closed outside Development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.24.1-alpha.0.154 42 11/19/2026
0.24.1-alpha.0.149 44 11/18/2026
0.24.1-alpha.0.145 47 11/18/2026
0.24.1-alpha.0.141 43 11/18/2026
0.24.1-alpha.0.140 98 11/18/2026
0.24.1-alpha.0.137 42 11/18/2026
0.24.1-alpha.0.136 47 11/18/2026
0.24.1-alpha.0.102 43 11/18/2026
0.24.1-alpha.0.101 52 11/17/2026
0.24.1-alpha.0.100 42 11/17/2026
0.24.1-alpha.0.98 50 11/17/2026
0.24.1-alpha.0.93 45 11/17/2026
0.24.1-alpha.0.91 41 11/17/2026
0.24.1-alpha.0.90 47 11/17/2026
0.24.1-alpha.0.88 53 11/17/2026
0.24.1-alpha.0.52 46 11/17/2026
0.24.1-alpha.0.51 59 11/16/2026
0.24.1-alpha.0.43 54 11/16/2026
0.24.1-alpha.0.37 57 11/16/2026
0.24.0 123 11/16/2026
Loading failed