Moberg.Warp.Worker 8.2.0

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

Warp

Background jobs, pub/sub messages and an in-process mediator for .NET 10, stored in the PostgreSQL or SQL Server database you already have.

NuGet Downloads Tests License: MIT Docs

Documentation · Getting started · Performance · Release notes

Why Warp

  • One library, four kinds of work. Jobs, messages, requests and streams share one handler model and one pipeline.
  • Jobs commit with your data. Warp writes to your EF Core DbContext, so a job and the row it belongs to are saved together or not at all. There is no broker to run.
  • Light on the database. Jobs are claimed in batches and completed in batches (dispatcher mode, the default since 8.0): about 0.22 statements per job.
  • A dashboard that explains what happened. State history, live handler logs, error groups, queue wait, SLOs and traces across jobs.
  • Nothing to register. A source generator finds your handlers at build time and dispatches to them without reflection.

Performance

The same 20,000 jobs on the same PostgreSQL server, 1 server × 10 workers, Warp 8.0 against Hangfire 1.8 (median of 3 runs):

Warp (dispatcher, default) Warp (single-worker) Hangfire
Drain 20,000 empty jobs 2.1 s 11.2 s 34.7 s
Drain 20,000 jobs that read and update a row 5.3 s 13.8 s 36.4 s
Database statements per empty job 0.22 7.03 40.03
Database time per empty job 0.061 ms 0.726 ms 3.444 ms
Memory allocated per empty job 15.2 KB 130.2 KB 75.0 KB

The harness is in src/benchmarks/Warp.Comparison and runs in the Comparison workflow. Setup, every measured row and the caveats are on the comparison page.

Quick start

dotnet add package Moberg.Warp.Core
dotnet add package Moberg.Warp.Worker
dotnet add package Moberg.Warp.Provider.PostgreSql   # or Moberg.Warp.Provider.SqlServer
dotnet add package Moberg.Warp.Dashboard
builder.Services.AddDbContext<AppDbContext>(o => o.UseNpgsql(connectionString));

builder.Services.AddWarpServer<AppDbContext>(opt =>
{
    opt.UsePostgreSql();      // or opt.UseSqlServer()
    opt.AddRetry(r => r.MaxRetries = 3);
});

var app = builder.Build();
app.MapWarpDashboard("/warp");
app.Run();

Warp adds its tables to your DbContext model, in the warp schema. Create them with your normal migrations:

dotnet ef migrations add AddWarp
dotnet ef database update

A job commits in the same transaction as your data:

// The job commits in the same transaction as the order.
db.Orders.Add(order);
await publisher.Enqueue(new SendConfirmationEmail { OrderId = order.Id });
await db.SaveChangesAsync();

public class SendConfirmationEmailHandler(IEmailSender email) : IJobHandler<SendConfirmationEmail>
{
    public Task HandleAsync(SendConfirmationEmail job, CancellationToken ct) =>
        email.SendConfirmation(job.OrderId, ct);
}

Use AddWarp in place of AddWarpServer in a process that only publishes. The getting started guide covers the rest.

Four patterns

// Job: one handler, durable, retried
await publisher.Enqueue(new GenerateReport { Month = 3 });
await publisher.Schedule(new GenerateReport { Month = 3 }, DateTime.UtcNow.AddHours(1));

// Message: every handler runs as its own job
await publisher.Publish(new OrderCreated { OrderId = order.Id });

// Request: in-process, typed response, no database
var user = await mediator.Send(new GetUser { UserId = 1 });

// Stream: in-process IAsyncEnumerable
await foreach (var item in mediator.CreateStream(new GetUsers { Role = "Admin" })) { }
Pattern Contract Handler Stored
Jobs IJob IJobHandler<T> Yes
Messages IMessage IMessageHandler<T>, any number Yes
Requests IRequest<TResponse> IRequestHandler<T, TResponse> No
Streams IStreamRequest<TResponse> IStreamRequestHandler<T, TResponse> No

IPipelineBehavior<T, TResponse> wraps all four.

Features

Jobs and workflows Transactional outbox · Recurring jobs · Batches and continuations · Named queues and worker groups · Sagas · Background services · Job metadata · Cancellation · Pause and resume

Flow control Retry · Mutex · Semaphore · Rate limit · Timeout · Circuit breaker · No-restart

Throughput and latency Dispatcher mode and batched completions · Database push (LISTEN/NOTIFY, Service Broker) · Crash recovery

HTTP and integrations HTTP endpoints from handlers · Outbound call adapters · Durable webhooks

Observability Dashboard · Tracing across jobs · Error grouping · Queue wait and backlog · SLOs and error budgets · Custom metrics · Operational notifications · Multi-application view

Dashboard

app.MapWarpDashboard("/warp") serves a dashboard with each job's state history, live handler logs, error groups, queue wait, SLOs and traces across jobs. See the dashboard docs.

Warp dashboard

Packages

Use the same version for all of them.

Package Purpose
Moberg.Warp.Core Publishing, the mediator, durable webhooks. Always required.
Moberg.Warp.Worker The server: workers and background tasks.
Moberg.Warp.Provider.PostgreSql PostgreSQL provider.
Moberg.Warp.Provider.SqlServer SQL Server provider.
Moberg.Warp.Dashboard The dashboard.
Moberg.Warp.Http Expose request and stream handlers as HTTP endpoints.
Moberg.Warp.Adapters.Http, Moberg.Warp.Adapters.Refit Observe and rate-limit outbound calls.

Package ids are Moberg.Warp.*; namespaces are Warp.*.

Coming from another library

Development

Requires the .NET 10 SDK, and Docker for the database tests.

dotnet build src/Warp.slnx
dotnet test --project src/tests/Warp.Tests/Warp.Tests.csproj                                      # all, about 5 minutes
dotnet test --project src/tests/Warp.Tests/Warp.Tests.csproj -- --filter-trait "Category=NoDb"    # no database
cd src/ui && npm install && npm run dev                                                           # dashboard on :5173

The source is under src/core (libraries and providers), src/ui (dashboard), src/tests, src/benchmarks and src/demo. The docs site is in website/.

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

Showing the top 2 NuGet packages that depend on Moberg.Warp.Worker:

Package Downloads
Moberg.Warp.Provider.PostgreSql

PostgreSQL provider for Moberg.Warp — notification transport (LISTEN/NOTIFY), row-lock SQL, distributed lock, and exception classification.

Moberg.Warp.Provider.SqlServer

SQL Server provider for Moberg.Warp — notification transport (Service Broker), row-lock SQL, distributed lock, and exception classification.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.2.0 0 11/28/2026
8.1.0 66 11/27/2026
8.0.0 96 11/25/2026
7.7.0 117 11/20/2026
7.6.0 121 11/19/2026
7.5.0 130 11/16/2026
7.4.0 370 11/2/2026
7.3.0 148 10/20/2026
7.2.0 138 10/14/2026
7.1.0 235 9/25/2026
7.0.0 154 9/19/2026
6.2.0 151 9/11/2026
6.1.2 179 9/9/2026
6.1.1 156 9/1/2026
6.1.0 169 8/31/2026
6.0.0 152 8/27/2026
5.1.0 262 8/22/2026
5.0.0 163 8/21/2026
4.1.0 179 8/18/2026
4.0.0 351 8/13/2026
Loading failed

See https://moberghr.github.io/warp/docs/releases for full release notes.