Redis queue and recurring storage provider for Immediate.Jobs.
Install
| Product | Versions |
|---|---|
| .NET |
README
Immediate.Jobs.Redis
Distributed Redis queue and recurring storage for Immediate.Jobs, built on StackExchange.Redis.
Installation
dotnet add package Immediate.Jobs --prerelease
dotnet add package Immediate.Jobs.Redis --prerelease
Configuration
Register an application-owned IConnectionMultiplexer, then select Redis storage and configure its key placement:
builder.Services.AddSingleton<IConnectionMultiplexer>(_ =>
ConnectionMultiplexer.Connect("localhost:6379"));
builder.Services.AddMyAppHandlers();
builder.Services.AddMyAppJobs()
.ConfigureStorage(storage => storage
.UseRedis()
.ConfigureRedis(redis =>
{
redis.Database = 0;
redis.KeyPrefix = "billing-jobs";
}));
AddMyAppJobs is the generated registration method for an assembly named MyApp.
The provider resolves IConnectionMultiplexer from dependency injection. The application controls how that connection
is created and shared. Registering it with the factory overload of AddSingleton lets the service provider dispose it
at shutdown.
The prefix isolates applications and keeps all of the application's keys in one Redis Cluster slot, which is required
for operations that update several keys together. Database defaults to -1 (the server default), and KeyPrefix
defaults to immediate-jobs. Prefixes cannot be empty or contain braces; invalid options fail validation when the host
starts.
Redis coordinates job claims between every application replica automatically. No UseSingleServer() or
UseDistributed() call is needed. If a process stops, work that it claimed becomes available to another replica after
the lease expires.
Capabilities and limitations
Redis supports ordinary and recurring jobs, fair queues, cancellation, retries, execution history, and retention.
Redis does not support batches or continuations; dependency graphs require the Entity Framework Core or LinqToDB provider.
More information
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.