flowwarden-redis is auto-configured via RedisStreamCoreAutoConfiguration. It activates when both spring-data-redis is on the classpath and a StringRedisTemplate bean is available — which is the default whenever you include spring-boot-starter-data-redis.
Properties
All properties are bound toRedisStreamCoreProperties under the prefix flowwarden.redis.
application.yml
The Redis connection itself (host, port, password, SSL, cluster mode) is configured through the standard Spring Boot
spring.data.redis.* properties. flowwarden-redis consumes whichever StringRedisTemplate Spring Boot exposes — pointing it at a single instance, a Sentinel set, or a cluster is transparent.What gets wired
The auto-configuration registers two beans, both guarded by@ConditionalOnMissingBean:
Conditions applied to the auto-configuration class:
@AutoConfiguration(after = RedisAutoConfiguration.class)— runs after Spring Boot’s Redis auto-config so theStringRedisTemplatebean is already available.@ConditionalOnClass(RedisTemplate.class)— skip entirely ifspring-data-redisis not on the classpath.@ConditionalOnBean(StringRedisTemplate.class)— skip if noStringRedisTemplateexists in the context (for example, when the Redis starter is present but no connection is configured).
@ConditionalOnMissingBean on each @Bean defers to any user-declared LockService or CheckpointStore, so user beans win without further configuration.
Storage layout
flowwarden-redis stores all of its state in Redis Hashes, keyed by stream name and namespaced with key-prefix:
Resume tokens (
lastSeenToken, lastProcessedToken) are encoded as base64 BSON so they round-trip exactly the same bytes Mongo’s Change Stream cursor returned, and metadata is stored as a JSON string.
Atomic operations
- Lock acquire / renew / release run as Lua scripts so the compare-and-set guarantee (only the current holder can renew or release the lock) holds across concurrent Redis clients without round-trips.
saveSeen/saveProcesseduse targetedHSETagainst the relevant pair of fields. This preserves the dual-token semantics from the core (lastSeenTokenadvances on every event received;lastProcessedTokenadvances only after handler success) without the read-modify-write that the SPI’s default implementations would do — see the @Checkpoint storage SPI section for the dual-token rationale.
Reactive variants
The reactive implementations (ReactiveRedisLockService, ReactiveRedisCheckpointStore) ship in the library but are not auto-configured. Spring Boot’s Redis auto-configuration creates both a blocking StringRedisTemplate and a ReactiveStringRedisTemplate whenever Lettuce is on the classpath — there is no reliable conditional that would let the auto-config pick one without surprising users in a typical Spring WebFlux setup.
Wire them explicitly when you want non-blocking Redis ops:
RedisReactiveConfig.java
@Bean declarations above win over the auto-configured blocking ones thanks to @ConditionalOnMissingBean.
Hybrid Mongo + Redis
Because each backend bean is independently auto-configured (and independently guarded by@ConditionalOnMissingBean), you can keep one in Mongo and the other in Redis by overriding only the one you want to move. For example — locks in Redis, checkpoints in Mongo:
HybridConfig.java
Disabling
There is no dedicatedenabled flag. To disable a Redis-backed bean, declare a different bean of the same type — or remove flowwarden-redis from the dependencies. Two practical patterns:
- Switch one bean back to Mongo — declare a
@Bean MongoLockService/@Bean MongoCheckpointStore(see Hybrid Mongo + Redis). - Disable both — drop
flowwarden-redisfrom the build. The core’s MongoDB backends auto-configure as soon asflowwarden-redisis no longer on the classpath.
See Also
LockService SPI
The contract
RedisLockService implements.@Checkpoint storage SPI
The contract
RedisCheckpointStore implements.Quickstart
Add
flowwarden-redis to your project in 5 minutes.