Redis Redisson backend
Latest stable Based on Leader release 0.4.0
Library module
Problem
Section titled “Problem”Implements single, group, and strategic election with Redisson locks/semaphores and blocking/coroutine APIs.
When to use it
Section titled “When to use it”Choose it when Redisson is already the Redis client and its distributed-object API is preferred over direct Lettuce scripting.
Coordinates
Section titled “Coordinates”Artifact: io.github.bluetape4k.leader:bluetape4k-leader-redis-redisson
dependencies { implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>")) implementation("io.github.bluetape4k.leader:bluetape4k-leader-redis-redisson")}Core concepts
Section titled “Core concepts”Acquisition always passes explicit leaseTime, so Redisson’s native watchdog is disabled. Core LeaderLeaseAutoExtender is the only automatic extender when enabled.
Quick start
Section titled “Quick start”val elector = RedissonLeaderElector(redissonClient)elector.runIfLeader("webhook-poller") { pollWebhooks() }API by task
Section titled “API by task”Use blocking/suspend single/group and strategic electors plus factories. Group election maps to semaphore-style permits.
Recommended patterns
Section titled “Recommended patterns”Keep one caller-owned client, stable lock names, explicit lease sizing, idempotent actions, and a deliberate choice about shared autoExtend.
Integrations
Section titled “Integrations”Spring factories use RedissonClient. redisson-watchdog explains the distinction between native watchdog and the library’s shared extender.
Configuration
Section titled “Configuration”Configure wait/lease/minimum lease, auto-extension, group size, Redis topology, client timeout, retry, and codec independently.
Failure modes
Section titled “Failure modes”Contention returns null. Interrupts, Redis/client failures, lost ownership, and extend/release errors propagate according to the backend classifier.
Operations
Section titled “Operations”Monitor Redis latency, connection state, lock TTL, permit usage, extension failures, skip rate, and failover events. Do not assume the native watchdog renewed a lock.
Testing
Section titled “Testing”Test two clients, explicit lease expiry, shared extender, owner-safe release, group permits, strategic registry, failover, and suspend cancellation.
Workshops and learning path
Section titled “Workshops and learning path”Run redisson-watchdog before production adoption, then compare rate-limiter and strategic-election examples.
Limitations
Section titled “Limitations”Explicit leases can expire during long pauses. Redisson ownership still does not fence writes to another store.
Release diagrams
Section titled “Release diagrams”These diagrams are loaded directly from README assets published with the 0.4.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.
leader redis redisson Class Structure diagram
Section titled “leader redis redisson Class Structure diagram”Release README: leader-redis-redisson/README.md
Scenario 1 — Normal acquire/release plus crash recovery diagram
Section titled “Scenario 1 — Normal acquire/release plus crash recovery diagram”Release README: leader-redis-redisson/README.md
Scenario 2 — minLeaseTime via updateLeaseTime diagram
Section titled “Scenario 2 — minLeaseTime via updateLeaseTime diagram”Release README: leader-redis-redisson/README.md


