spring-cloud / spring-cloud/spring-cloud-stream
Kafka-streams health check on state stores
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
The default setup with spring-cloud-streams, kafka-streams and spring-boot-actuator includes adding the state of the stream threads into the health check endpoint. This is great, but if my application is using a state store, and that store is still in the process of restoring, the application still returns as being Up. When I then try and interact with the store via the InteractiveQueryService I get one of the following errors about the stream thread not being running
Cannot get state store because the stream thread is STARTING, not RUNNING
Cannot get state store because the stream thread is PARTITIONS_ASSIGNED, not RUNNING
Is there any way I can include this stream thread status in the health checks, so that I can prevent requested being routed to it until the state store is available?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how spring-boot-actuator health checks expose Kafka stream-thread state and how InteractiveQueryService reports unavailable state stores. Define the health result for STARTING and PARTITIONS_ASSIGNED states, then verify that the health check prevents traffic before the store is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka, spring
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100