Redis Shared State Store
class RedisSharedStateStore(commands: RedisAsyncCommands<String, String>, keyPrefix: String = "arrow-resilience:", ttl: Duration? = null) : SharedStateStore
Redis-backed SharedStateStore (via Lettuce) for coordinating resilience state across instances, e.g. with DistributedRateLimiter and DistributedCircuitBreaker. compareAndSet is atomic through a Lua script.
Lettuce is a compileOnly dependency: add io.lettuce:lettuce-core yourself.
val store = RedisSharedStateStore(client.connect().async(), keyPrefix = "myapp:", ttl = 1.hours)Content copied to clipboard
Parameters
commands
Lettuce async commands
key Prefix
prefix applied to every key
ttl
optional expiry refreshed on each write