Rask.Outbox 0.20.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.20.0
                    
NuGet\Install-Package Rask.Outbox -Version 0.20.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.20.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.Outbox" Version="0.20.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.20.0
                    
#r "nuget: Rask.Outbox, 0.20.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.20.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.20.0
                    
Install as a Cake Addin
#tool nuget:?package=Rask.Outbox&version=0.20.0
                    
Install as a Cake Tool

Rask.Outbox

A transactional outbox for Rask.Data entities — durable, crash-safe domain-event delivery on the app's own database, with no broker or Redis.

  • Mark a domain event IOutboxEvent and it's written to an OutboxMessage table in the same transaction as the change that raised it — so an event is never lost, and never fires for a change that rolled back.
  • A background OutboxProcessor polls the table and publishes each message through Rask.Cqrs (IDispatcher.PublishAsync) — at-least-once, with retries and an attempt count.
  • Published messages are purged after RetentionPeriod (default 7 days) so the table doesn't grow forever. Dead letters are never purged — 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.
  • A source generator registers every IOutboxEvent type for reflection-free lookup on the drain path.

Use

public sealed record OrderPlaced(Guid Id) : IOutboxEvent;   // raised on your Entity

// Program.cs
builder.Services.AddRaskCqrs();
builder.Services.AddRaskData(o => o.DispatchDomainEventsInProcess = false); // the outbox owns delivery
builder.Services.AddRaskOutbox<AppDbContext>(o => o.PollInterval = TimeSpan.FromSeconds(5));

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

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

db.SaveChanges() now writes an OutboxMessage row for each IOutboxEvent the entity raised, in the same transaction; the processor drains and publishes them just after commit. Any INotificationHandler<OrderPlaced> reacts — the same handler works whether events are delivered in-process (Rask.Data) or via the outbox.

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

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

Package Downloads
Rask.Dashboard

A built-in operator dashboard for the Rask One Person Framework batteries. Mounts at /_ops and shows the outbox, background jobs, queued mail and cache 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.20.1-alpha.0.9 0 8/7/2026
0.20.1-alpha.0.8 0 8/7/2026
0.20.1-alpha.0.7 0 8/7/2026
0.20.1-alpha.0.5 0 8/7/2026
0.20.1-alpha.0.4 0 8/7/2026
0.20.1-alpha.0.3 0 8/7/2026
0.20.1-alpha.0.2 26 8/6/2026
0.20.0 37 8/6/2026
0.19.1-alpha.0.75 31 8/6/2026
0.19.1-alpha.0.74 30 8/6/2026
0.19.1-alpha.0.73 35 8/6/2026
0.19.1-alpha.0.69 25 8/6/2026
0.19.1-alpha.0.68 43 8/6/2026
0.19.1-alpha.0.67 29 8/6/2026
0.19.1-alpha.0.66 39 8/6/2026
0.19.1-alpha.0.64 33 8/6/2026
0.19.1-alpha.0.62 36 8/5/2026
0.19.1-alpha.0.57 36 8/5/2026
0.19.1-alpha.0.51 35 8/5/2026
0.19.1-alpha.0.43 33 8/5/2026
Loading failed