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: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:Lifecycle Actions
FlowWarden provides three lifecycle actions via POST requests:Stop a stream
Start a stream
Restart a stream
Architecture
Auto-Configuration
FlowWardenActuatorAutoConfiguration registers two beans:
The auto-configuration is conditional:
- 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