OrionGuard.Locks.Redis
6.5.11
dotnet add package OrionGuard.Locks.Redis --version 6.5.11
NuGet\Install-Package OrionGuard.Locks.Redis -Version 6.5.11
<PackageReference Include="OrionGuard.Locks.Redis" Version="6.5.11" />
<PackageVersion Include="OrionGuard.Locks.Redis" Version="6.5.11" />
<PackageReference Include="OrionGuard.Locks.Redis" />
paket add OrionGuard.Locks.Redis --version 6.5.11
#r "nuget: OrionGuard.Locks.Redis, 6.5.11"
#:package OrionGuard.Locks.Redis@6.5.11
#addin nuget:?package=OrionGuard.Locks.Redis&version=6.5.11
#tool nuget:?package=OrionGuard.Locks.Redis&version=6.5.11
OrionGuard.Locks.Redis
Redis backend for OrionGuard's outbox IDistributedLock.
A bridge package that lets consumers using OrionGuard.EntityFrameworkCore's outbox dispatcher coordinate across replicas through Redis instead of the default DB-backed SkipLockedDistributedLock.
Install
dotnet add package OrionGuard.Locks.Redis
Adds a transitive dependency on OrionLock.Redis (>= 0.2.3) and OrionGuard.EntityFrameworkCore (>= 6.5.0).
Use
Connection-string form:
services.AddOrionGuardEfCore<AppDbContext>(opts => opts
.UseOutbox()
.UseOrionLockRedis("localhost:6379", o => o.KeyPrefix = "myapp:outbox:"));
Shared multiplexer form (recommended when other parts of the app already use Redis):
services.AddSingleton<IConnectionMultiplexer>(_ => ConnectionMultiplexer.Connect("localhost:6379"));
services.AddOrionGuardEfCore<AppDbContext>(opts => opts
.UseOutbox()
.UseOrionLockRedis(o => o.KeyPrefix = "myapp:outbox:"));
What it does
Implements OrionGuard's IDistributedLock over OrionLock's raw IDistributedLockProvider (the single-attempt primitive Moongazing.OrionLock.Redis.RedisLockProvider). TryAcquireAsync returns null immediately on contention; disposing the handle issues an owner-checked release (Lua compare-and-delete on Redis). No blocking-acquire retry, no watchdog renewal, no reentrancy — OrionGuard's outbox dispatcher already polls on its own cadence and tolerates lease loss by design.
Trade-offs vs the default SkipLockedDistributedLock
- Pros: removes the
OrionGuard_OutboxLocksrow write/update per polling cycle from the primary database. Useful when the primary DB is hot or read-replicated. - Cons: introduces Redis as a hard dependency for outbox dispatch. If Redis is unreachable, the dispatcher polls but never acquires; outbox messages still safely accumulate (they are written by the same transaction that mutates aggregate state).
License
MIT.
| 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 is compatible. 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 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. |
-
net10.0
- OrionGuard.EntityFrameworkCore (>= 6.5.11)
- OrionLock.Redis (>= 0.2.3)
-
net8.0
- OrionGuard.EntityFrameworkCore (>= 6.5.11)
- OrionLock.Redis (>= 0.2.3)
-
net9.0
- OrionGuard.EntityFrameworkCore (>= 6.5.11)
- OrionLock.Redis (>= 0.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.