-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling kafka streams health checks creates invalid topology with Kafka 2.5.0 #196
Comments
Seems the solution is to upgrade to 2.5.1 |
Overwrote the Kafka version to a release candidate for 2.6.0. Looks like they made it more of an explicit error, actually. Instead of getting a “consumer is not subscribed to any topics or assigned any partitions” error when I disable the health check I get an “Invalid topology: Topology has no stream threads and no global threads, must subscribe to at least one source topic or global table” error. |
Ok, would you like to submit a PR for your proposed fix? |
Similar error happens for me when I have only named streams. Still ConfiguredStreamBuilder is created for DefaultKafkaStreamsConfiguration, but it's not assigned any topic. Hence the error (Kafka 2.5.1): |
can one of you provide an example that reproduces the error |
I can confirm the behavior @kascakm described. So this does not seem to be solely related to the health endpoint. Is there an extra issue for that? That issue is really severe and took me quite some time to figure out why my streams app does not properly run in my k8s cluster. As a result of this issue the global health check fails and therefore the pods get constantly re-scheduled! |
The current property for disabling streams health checks is "kafka.streams.health.enabled". Being under the kafka.streams path, a ConfiguredStreamBuilder named "health" is being created, and a KafkaStreams instance is being built from it.
Kafka 2.5.0+ requires all topologies have either global tables or input streams. Since the "health" builder is not used to build a topology anywhere, it fits this category and triggers this error.
I believe the easiest solution would be changing the prefix for the streams HealthIndicator. That or filtering as to not create a "health" ConfiguredStreamBuilder.
The text was updated successfully, but these errors were encountered: