Moberg.Warp.Adapters.Refit 8.4.0

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

Warp: background jobs for .NET, in the database you already run

NuGet Downloads Tests License: MIT

Documentation · Getting started · Why Warp · Performance · Release notes

Warp runs background jobs, pub/sub messages and in-process requests for .NET 10 and .NET 11 on PostgreSQL or SQL Server, through your own EF Core DbContext. A job is saved in the same transaction as the data it belongs to, and there is no broker to operate.

Why Warp

  • Jobs commit with your data. Warp writes to your DbContext, so a job and the row it belongs to are saved together or not at all.
  • Light on the database. Jobs are claimed in batches and completed in batches (dispatcher mode, the default since 8.0): as few as 0.22 statements per empty job with prefetch, about 0.46 with the default of no prefetch.
  • One library, four kinds of work. Jobs, messages, requests and streams share one handler model and one pipeline.
  • 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.

Not sure it fits? When another tool fits better.

Performance

The queue shares your database, so it should not crowd it. The same 20,000 jobs on the same PostgreSQL server, 1 server × 10 workers, Warp 8.0 (with prefetch) against Hangfire 1.8 (median of 3 runs):

Time to drain a queue, Warp against Hangfire

Per empty job Warp (dispatcher, prefetch) Warp (single-worker) Hangfire
Database statements 0.22 7.03 40.03
Database time 0.061 ms 0.726 ms 3.444 ms
Memory allocated 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

1. Add the packages.

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

2. Register Warp on your DbContext.

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

3. Create the tables. Warp adds them to your DbContext model, in the warp schema, so your normal migrations create them.

dotnet ef migrations add AddWarp
dotnet ef database update

A job commits in the same transaction as your data:

public async Task PlaceOrder(Order order, CancellationToken ct)
{
    db.Orders.Add(order);

    // Saved in the same transaction as the order.
    await publisher.Enqueue(new SendConfirmationEmail { OrderId = order.Id });

    await db.SaveChangesAsync(ct);
}

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.

The dashboard

app.MapWarpDashboard("/warp") serves it from your own application. Light and dark.

The Warp dashboard

A failed job with its exception, state history and logs A running job with live handler logs and progress
Why a job failed. The exception, every state it passed through, and the handler's own logs. What a job is doing now. Handler logs and progress while it is still running.
A trace across the jobs one request started Failures grouped into issues
What one request set off. A trace across every job and message it started. Which failures are the same failure. Errors grouped into issues, each with its event count and status.

Features

Area Docs
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

Packages

Use the same version for all of them. Package ids are Moberg.Warp.*; namespaces are Warp.*.

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.

Runs on .NET 10 (EF Core 10) and .NET 11 (EF Core 11) with PostgreSQL 17 and 18 or SQL Server 2022 and 2025.

Coming from another library

Warp covers the ground of a job scheduler such as Hangfire or Quartz.NET, an in-process mediator such as MediatR, and a database-backed outbox and message bus such as Wolverine, MassTransit or NServiceBus on a SQL transport.

For AI assistants and agents

Warp publishes its docs in a form a coding assistant can read directly:

File Use it for
llms.txt The index: what Warp is, the facts to get right, and a one-line summary of every docs page.
llms-full.txt One self-contained reference with every pattern, the API, configuration and examples.
Any docs URL + .md That page as plain Markdown, for example /docs/getting-started.md.
AGENTS.md Rules for an agent changing this repository, as opposed to using Warp.

To have an assistant add Warp to your project, give it https://moberghr.github.io/warp/llms-full.txt.

Development

Requires the .NET 11 SDK and the .NET 10 runtime (the packages and tests target both), 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/.

Contributing

Issues and pull requests are welcome: see CONTRIBUTING.md. Report a security problem privately, as described in SECURITY.md.

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.  net11.0 is compatible. 
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
8.4.0 42 12/1/2026
8.3.0 100 11/30/2026
8.2.0 108 11/28/2026
8.1.0 103 11/27/2026
8.0.0 107 11/25/2026
7.7.0 102 11/20/2026
7.6.0 100 11/19/2026
7.5.0 97 11/16/2026
7.4.0 116 11/2/2026
7.3.0 111 10/20/2026
7.2.0 140 10/14/2026
7.1.0 143 9/25/2026
7.0.0 122 9/19/2026
6.2.0 123 9/11/2026
6.1.2 142 9/9/2026
6.1.1 127 9/1/2026
6.1.0 137 8/31/2026
6.0.0 128 8/27/2026
5.1.0 136 8/22/2026
5.0.0 122 8/21/2026
Loading failed

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