|
For the latest stable version, please use Spring Boot Admin Extensions 4.1.1.1! |
Redis event store
sba-extension-store-redis is a Redis-backed InstanceEventStore that keeps the registry across
admin restarts without making Redis a single point of failure.
-
The in-memory log stays authoritative. Reads never touch Redis.
-
Every write is mirrored to Redis in the background.
-
A Redis outage never blanks the registry and never fails a write.
-
On startup the store replays the mirrored log back into memory.
1. Install
<dependency>
<groupId>org.alexmond</groupId>
<artifactId>sba-extension-store-redis</artifactId>
<version>4.0.8.1</version>
</dependency>
spring:
data:
redis:
host: redis.internal
port: 6379
password: ${REDIS_PASSWORD}
sba:
eventstore:
type: redis
Without sba.eventstore.type=redis the jar does nothing.
2. Properties
All are optional. Prefix: sba.eventstore.redis.
| Property | Default | Meaning |
|---|---|---|
|
|
Redis key namespace: |
|
|
Timeout for each Redis command. |
|
|
Time-to-live of an instance’s key, refreshed on every write. |
|
|
Replay the mirrored log into memory when the admin starts. |
|
|
Also replay instances that came from a |
3. Health
The eventStorePersistence health indicator reports UP while Redis is reachable and DEGRADED
(HTTP 200) while it is not. Keep it out of liveness and readiness groups, and switch off Spring
Boot’s generic Redis check, which would report DOWN:
management:
health:
redis:
enabled: false
5. Security
Events are stored with JDK serialization. Use only an authenticated Redis that nothing else can write to. See SECURITY.md.