NexJob.Redis
5.4.0
See the version list below for details.
dotnet add package NexJob.Redis --version 5.4.0
NuGet\Install-Package NexJob.Redis -Version 5.4.0
<PackageReference Include="NexJob.Redis" Version="5.4.0" />
<PackageVersion Include="NexJob.Redis" Version="5.4.0" />
<PackageReference Include="NexJob.Redis" />
paket add NexJob.Redis --version 5.4.0
#r "nuget: NexJob.Redis, 5.4.0"
#:package NexJob.Redis@5.4.0
#addin nuget:?package=NexJob.Redis&version=5.4.0
#tool nuget:?package=NexJob.Redis&version=5.4.0
NexJob.Redis
High-throughput Redis storage provider for NexJob — the background job scheduler for .NET 8+.
Backed by StackExchange.Redis, this provider evaluates server-side Lua scripts to execute atomic, lock-free state transitions and priority queue operations at microsecond latencies.
Installation
dotnet add package NexJob.Redis
Quick Start
Register Redis storage in your dependency injection container before calling AddNexJob():
using NexJob;
using NexJob.Redis;
var builder = WebApplication.CreateBuilder(args);
// 1. Register Redis storage
builder.Services.AddNexJobRedis("localhost:6379,abortConnect=false");
// 2. Register NexJob core services
builder.Services.AddNexJob(options =>
{
options.Workers = 10;
options.Queues = ["default", "critical"];
});
Or provide a pre-configured IConnectionMultiplexer:
var multiplexer = ConnectionMultiplexer.Connect("localhost:6379");
builder.Services.AddNexJobRedis(multiplexer);
Distributed Throttling
When scaling workers across multiple server instances or containers, in-memory rate limits only throttle per process. You can enable global, cluster-wide rate limiting with AddNexJobDistributedThrottle:
builder.Services.AddNexJobRedis("localhost:6379")
.AddNexJobDistributedThrottle();
Any job decorated with [Throttle("external-api", 50, ThrottleWindow.PerMinute)] will automatically enforce a strict global Redis rate limit across all worker nodes.
Features
- Microsecond Latency: Ultra-fast job enqueue and dispatch leveraging in-memory data structures.
- Server-Side Lua Scripts: All complex state transitions (dequeuing, state commits, retry rescheduling) run atomically inside Redis, preventing race conditions.
- Priority Queues: Implemented using Redis Sorted Sets (
ZSET) ordered by job priority and schedule timestamp. - Global Distributed Throttle: Native sliding window rate limiting across multiple hosts.
- Runtime Settings Store: Hot-reloads queue concurrency and pause states from Redis hash keys.
Key Structure
All keys are namespaced with nexjob: to avoid collisions:
| Key Pattern | Data Structure | Purpose |
|---|---|---|
nexjob:jobs:{id} |
Hash (HSET) |
Job record properties and execution logs |
nexjob:queues:{queue} |
Sorted Set (ZSET) |
Ready jobs sorted by priority and arrival time |
nexjob:scheduled |
Sorted Set (ZSET) |
Delayed / scheduled jobs sorted by execution timestamp |
nexjob:processing |
Hash (HSET) |
In-flight jobs being processed by workers |
nexjob:recurring:all |
Hash (HSET) |
Recurring cron jobs and schedule configurations |
nexjob:servers:all |
Hash (HSET) |
Active worker nodes and heartbeats |
nexjob:settings |
Hash (HSET) |
Dynamic queue limits and pause status |
Connection Configuration Example
{
"ConnectionStrings": {
"Redis": "redis.production.cache.internal:6380,ssl=True,abortConnect=False,connectTimeout=5000"
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- NexJob (>= 5.4.0)
- StackExchange.Redis (>= 2.8.16)
- System.Text.Encodings.Web (>= 8.0.0)
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 |
|---|---|---|
| 6.7.0 | 77 | 10/19/2026 |
| 6.6.0 | 87 | 10/18/2026 |
| 6.5.1 | 89 | 10/17/2026 |
| 6.5.0 | 83 | 10/17/2026 |
| 6.4.0 | 85 | 10/16/2026 |
| 6.3.0 | 91 | 10/12/2026 |
| 6.2.1 | 79 | 10/11/2026 |
| 6.2.0 | 83 | 10/10/2026 |
| 6.1.0 | 83 | 10/10/2026 |
| 6.0.0 | 85 | 10/9/2026 |
| 5.10.0 | 88 | 10/8/2026 |
| 5.9.0 | 92 | 10/5/2026 |
| 5.8.0 | 103 | 10/4/2026 |
| 5.7.0 | 87 | 10/1/2026 |
| 5.6.2 | 91 | 10/1/2026 |
| 5.6.1 | 90 | 9/30/2026 |
| 5.6.0 | 85 | 9/30/2026 |
| 5.5.0 | 93 | 9/25/2026 |
| 5.4.1 | 92 | 9/24/2026 |
| 5.4.0 | 95 | 9/24/2026 |