Soenneker.Flywheel.Redis 4.0.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Flywheel.Redis --version 4.0.3
                    
NuGet\Install-Package Soenneker.Flywheel.Redis -Version 4.0.3
                    
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="Soenneker.Flywheel.Redis" Version="4.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Flywheel.Redis" Version="4.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Flywheel.Redis" />
                    
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 Soenneker.Flywheel.Redis --version 4.0.3
                    
#r "nuget: Soenneker.Flywheel.Redis, 4.0.3"
                    
#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 Soenneker.Flywheel.Redis@4.0.3
                    
#: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=Soenneker.Flywheel.Redis&version=4.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Flywheel.Redis&version=4.0.3
                    
Install as a Cake Tool

NuGet Publish Downloads Build and test CodeQL

Soenneker.Flywheel.Redis

Keep Flywheel jobs in Redis and share the work across app instances. This provider saves jobs, schedules, and logs, and coordinates which worker can update each job.

Why use it?

Feature What it does for you
Persistent job state Keep pending jobs and schedules across app restarts, subject to your Redis persistence settings.
Worker recovery Let another worker retry abandoned work after the original worker's ownership expires.
Ownership checks Reject updates from a worker whose ownership has expired or been replaced.
Shared limits and priorities Apply concurrency and rate limits across workers, and select higher-priority jobs first.
Duplicate-submission protection Return the original job ID when the same enqueue key is submitted again.
Stored logs and job search Supply the dashboard with searchable jobs and logs from multiple attempts.
Cron schedules Save calendar schedules with time zones and recover one missed occurrence after downtime.
Durable chains Save all steps together and release each next step in the same transaction that records predecessor success.

What makes it different?

Coordination uses C# and native Redis transactions, with no Lua scripts. Redis supplies the clock for worker ownership and stored scheduling, so those decisions share one clock across machines. Connections are reused through Soenneker.Redis.Client.

Each namespace keeps related keys in one Redis Cluster slot so job updates can be committed together. Namespaces also let separate apps or environments share a Redis deployment without mixing their jobs.

Setup

Requires Redis 6.0.9 or newer. Reference this project alongside Core and Generators using the Core setup guide.

Usage

Register in your host's Program.cs:

using Soenneker.Flywheel.Core.Registrars;
using Soenneker.Flywheel.Generated;
using Soenneker.Flywheel.Redis;

builder.Services.AddFlywheel()
    .AddRedis(options =>
    {
        options.ConnectionString = "localhost:6379";
        options.Namespace = "my-app";
        options.HistoryRetention = TimeSpan.FromDays(30);
        options.RetainCompletedJobs = true;
    })
    .AddGeneratedJobs();

Use the same namespace and job registrations on workers that should share jobs. Use different namespaces for separate apps or environments.

Notes

  • Enable Redis persistence and set maxmemory-policy to noeviction so Redis does not evict job data when memory fills up.
  • Redis failover can lose recent writes. Choose persistence and backups for your needs.
  • Aggregate activity is retained for HistoryRetention (one day by default, from five minutes through 365 days).
  • With RetainCompletedJobs enabled, terminal job records and logs are retained for the same period. Disable it to retain only aggregate activity after maintenance processes the terminal job.
  • Logs keep up to 1,000 entries per job and expire no sooner than 30 days after the last entry; retained jobs use the longer configured history period.
  • Stop older workers before upgrading the storage implementation.
  • Upgrade every worker before submitting cron schedules or chains. Older workers do not understand cron metadata or release chain successors. Existing interval schedules remain readable.
  • Chains contain up to 100 steps. Permanent failure or cancellation cancels the remaining steps; ordinary retries keep them waiting.

Core usage and demo

Committed change notifications

RedisJobStore implements IJobChangeFeed. Job writes, recurring schedule creation and log appends queue a native Redis PUBLISH inside the same conditional transaction. Known transaction conflicts do not publish changes, and there is no separate process-crash gap between committing data and publishing its notification. Messages contain only a change kind and optional job ID.

Every dashboard node subscribes to its namespace/database channel, then pushes snapshots to its own authenticated SignalR clients. A separate SignalR backplane is not required for these storage notifications. Pub/Sub is not a durable event log: subscriptions emit Resync after establishment/reconnection and on buffer overflow so consumers reread authoritative state. Subscription queues are bounded and disconnected subscriptions are removed.

The Redis account needs PUBLISH, SUBSCRIBE, and UNSUBSCRIBE in addition to the existing read/transaction commands. No Lua was introduced. Upgrade the server and dashboard client together because the old timed invalidation protocol has been removed.

Running count and execution IDs

IJobRunningCountStore.GetRunningCount reads the cardinality of the running index. Claim adds a job; completion, cancellation cleanup, or lease recovery removes it. It includes running jobs outside the current search and chart window. An expired lease can remain in the count until maintenance recovers it. History's Running field has different semantics: it records attempt-start events in a bucket.

New execution IDs are GUIDs in N format, including recurring occurrences. Recurring schedule registration keys remain caller supplied. Existing IDs are preserved, so callers should not reject older IDs that are not GUIDs.

Redis consumes Core, Redis Client, and Redis Semaphores through NuGet. The complete demo lives in the Dashboard repository. Build it against the same package versions that will be deployed.

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
5.0.27 0 9/11/2026
5.0.26 26 9/10/2026
5.0.25 37 9/10/2026
5.0.24 30 9/10/2026
5.0.23 29 9/10/2026
5.0.22 37 9/10/2026
5.0.21 45 9/9/2026
5.0.12 67 9/9/2026
5.0.8 52 9/8/2026
5.0.7 50 9/8/2026
5.0.4 56 9/8/2026
5.0.3 53 9/8/2026
5.0.2 60 9/8/2026
5.0.1 62 9/8/2026
4.0.23 46 9/8/2026
4.0.22 57 9/8/2026
4.0.21 64 9/8/2026
4.0.19 63 9/7/2026
4.0.18 64 9/7/2026
4.0.3 70 9/6/2026
Loading failed