spring-boot-starter-actuator is on the classpath.
Prerequisites
Add the Actuator starter to your project:FlowWardenActuatorAutoConfiguration activates automatically via @ConditionalOnClass(Endpoint.class).
Health Indicator
FlowWarden contributes aflowWarden component to /actuator/health:
Health Logic
The health indicator considers only streams that are both enabled and autoStart:| Condition | Status |
|---|---|
| All enabled + autoStart streams are running | UP |
| At least one enabled + autoStart stream is stopped | DOWN |
| No streams registered | UP |
Stream is disabled (enabled = false) | Not counted |
Stream has autoStart = false | Not counted |
Streams with
autoStart = false are excluded from health checks because they are expected to be started manually or by the FlowWarden Console.Configuration
To see health details, configure Actuator:application.yml
Custom Endpoint
FlowWarden exposes a dedicated endpoint at/actuator/flowwarden.
GET /actuator/flowwarden
Returns the status of all registered streams with detailed information per stream:| Field | Type | Description |
|---|---|---|
streams | Map<String, Object> | Each stream name mapped to its status object |
streams.*.status | String | "UP" if the stream is running, "DOWN" otherwise |
streams.*.mode | String | Deployment mode: ALL_INSTANCES or SINGLE_LEADER |
streams.*.lastEventTime | String? | ISO-8601 timestamp of the last processed event, or null if no event has been received yet |
healthy | boolean | true if all enabled + autoStart streams are running |
Lifecycle Actions
FlowWarden provides three lifecycle actions via POST requests:| Endpoint | Action | Description |
|---|---|---|
POST /actuator/flowwarden/{streamName}/stop | stopped | Stops a running stream |
POST /actuator/flowwarden/{streamName}/start | started | Starts a stopped stream |
POST /actuator/flowwarden/{streamName}/restart | restarted | Stops and restarts a stream |
Stop a stream
Start a stream
Restart a stream
Architecture
Auto-Configuration
FlowWardenActuatorAutoConfiguration registers two beans:
| Bean | Class | Purpose |
|---|---|---|
flowWardenEndpoint | FlowWardenEndpoint | Custom /actuator/flowwarden endpoint |
flowWardenHealthIndicator | FlowWardenHealthIndicator | Health contributor to /actuator/health |
- Requires
spring-boot-actuatoron the classpath (@ConditionalOnClass(Endpoint.class)) - Loads after
FlowWardenAutoConfigurationto ensureFlowWardenStreamManagerandStreamRegistryare available
Disabling
Both beans can be disabled independently via standard Spring Boot properties:application.yml
If you don’t have
spring-boot-starter-actuator in your dependencies, neither bean is created — no configuration needed.Kubernetes Integration
Readiness Probe
Use the health endpoint as a readiness probe to prevent traffic from reaching an instance with unhealthy streams:deployment.yml
Liveness Probe
For liveness, you can use the dedicated FlowWarden endpoint:deployment.yml
Full Kubernetes Deployment Example
Full Kubernetes Deployment Example
Best Practices
- Expose only what you need — limit
management.endpoints.web.exposure.includetohealth,flowwardenin production - Secure endpoints — use Spring Security to restrict access to management endpoints, especially lifecycle actions (
stop,start,restart) - Use
healthyfor probes — thehealthyfield in the FlowWarden endpoint is a single boolean suitable for automated checks - Monitor
lastEventTime— anullor stalelastEventTimecan indicate that no events are being received, even if the stream isUP - Prefer
restartover stop + start — therestartaction is atomic and ensures the stream is properly recycled
See Also
@ChangeStream
Stream registration and configuration
Configuration
YAML properties reference