Naravel.Queue.Coordination 0.2.0

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

Naravel.Queue.Coordination

NuGet Downloads .NET 10 License: MIT

Optional Naravel.Queue job middleware that coordinates workers through Naravel.Cache locks and rate limits: WithoutOverlapping, RateLimited and ThrottlesExceptions.

Fact Detail
Install dotnet add package Naravel.Queue.Coordination
Targets .NET 10
Needs Naravel.Queue and Naravel.Cache, which NuGet installs with it
Works with a shared cache store such as Naravel.Cache.Redis when workers run in several processes

What you get

  • WithoutOverlapping(key) runs one job per key at a time.
  • RateLimited(limiter, maxAttempts, window) allows at most that many jobs per window.
  • ThrottlesExceptions(maxExceptions, window, backoff) stops running a kind of job for a while after repeated exceptions.
  • Unique jobs. An IUniqueJob rejects a duplicate at dispatch.

Quick start

using Naravel.Queue.Coordination;
using Naravel.Queue.Jobs;
using Naravel.Queue.Middleware;

builder.Services.AddNaravelCache(builder.Configuration);   // add AddNaravelRedisCache(...) from Naravel.Cache.Redis when several processes run workers
builder.Services.AddQueueCoordination();

public sealed class SyncInvoice : Job, IHasJobMiddleware
{
    public int InvoiceId { get; set; }

    public IEnumerable<IJobMiddleware> Middleware(JobContext context) => new IJobMiddleware[]
    {
        new RateLimited("billing-api", maxAttempts: 60, window: TimeSpan.FromMinutes(1)),   // before WithoutOverlapping: a job the limiter holds back never took the lock
        new WithoutOverlapping($"invoice:{InvoiceId}")
    };

    public override Task HandleAsync(JobContext context, CancellationToken cancellationToken) =>
        Task.CompletedTask;                                                                 // your work goes here
}

A job that is held back is released to its queue without using up an attempt. The locks and counters live in Naravel.Cache, so workers in several processes need a shared cache store such as Redis. The rate limiter is a fixed window, so around a window boundary it can let up to twice the limit through.

Learn more

Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.

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

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
0.2.0 94 11/13/2026
0.1.1 107 11/2/2026
0.1.0 110 11/1/2026