Rask.Outbox 0.23.1-alpha.0.271

This is a prerelease version of Rask.Outbox.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Rask.Outbox --version 0.23.1-alpha.0.271
                    
NuGet\Install-Package Rask.Outbox -Version 0.23.1-alpha.0.271
                    
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.23.1-alpha.0.271" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.Outbox" Version="0.23.1-alpha.0.271" />
                    
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.23.1-alpha.0.271
                    
#r "nuget: Rask.Outbox, 0.23.1-alpha.0.271"
                    
#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.23.1-alpha.0.271
                    
#: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.23.1-alpha.0.271&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rask.Outbox&version=0.23.1-alpha.0.271&prerelease
                    
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 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 (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, PostgreSQL or SQL Server, 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.23.1-alpha.0.412 17 10/17/2026
0.23.1-alpha.0.411 34 10/17/2026
0.23.1-alpha.0.410 30 10/17/2026
0.23.1-alpha.0.409 43 10/16/2026
0.23.1-alpha.0.408 38 10/16/2026
0.23.1-alpha.0.406 35 10/16/2026
0.23.1-alpha.0.402 36 10/16/2026
0.23.1-alpha.0.392 36 10/16/2026
0.23.1-alpha.0.391 36 10/16/2026
0.23.1-alpha.0.390 41 10/16/2026
0.23.1-alpha.0.389 45 10/15/2026
0.23.1-alpha.0.388 44 10/15/2026
0.23.1-alpha.0.387 44 10/15/2026
0.23.1-alpha.0.385 57 10/15/2026
0.23.1-alpha.0.384 49 10/15/2026
0.23.1-alpha.0.380 42 10/15/2026
0.23.1-alpha.0.377 55 10/15/2026
0.23.1-alpha.0.373 39 10/15/2026
0.23.1-alpha.0.271 55 10/12/2026
0.23.0 221 9/18/2026
Loading failed