Revert "Make the Kafka health check configuration more future proof"

This reverts commit 397424e2f1.

It was a bad idea of mine. I really don't like us not using Quarkus
config but making things inconsistent and requiring another property is
an even worse idea.
This commit is contained in:
Guillaume Smet
2020-02-06 14:42:11 +01:00
parent 64f0e690cd
commit 1f7731e9a6
4 changed files with 2 additions and 24 deletions

View File

@@ -352,7 +352,6 @@ to validate the connection to the broker. This is disabled by default.
If enabled, when you access the `/health/ready` endpoint of your application you will have information about the connection validation status.
This behavior can be enabled by setting the `quarkus.kafka.health.enabled` property to `true` in your `application.properties`.
You also need to point `quarkus.kafka.bootstrap-servers` to your Kafka cluster.
== JSON serialization

View File

@@ -20,7 +20,7 @@ import org.eclipse.microprofile.health.Readiness;
@ApplicationScoped
public class KafkaHealthCheck implements HealthCheck {
@ConfigProperty(name = "quarkus.kafka.bootstrap-servers", defaultValue = "localhost:9092")
@ConfigProperty(name = "kafka.bootstrap.servers", defaultValue = "localhost:9092")
private String bootstrapServers;
private AdminClient client;

View File

@@ -1,21 +0,0 @@
package io.quarkus.kafka.client.runtime;
import java.net.InetSocketAddress;
import java.util.List;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
/**
* For now, this is not used except to avoid a warning for the health check.
*/
@ConfigRoot(name = "kafka", phase = ConfigPhase.RUN_TIME)
public class KafkaRuntimeConfig {
/**
* A comma-separated list of host:port pairs identifying the Kafka bootstrap server(s)
*/
@ConfigItem(defaultValue = "localhost:9012")
public List<InetSocketAddress> bootstrapServers;
}

View File

@@ -4,4 +4,4 @@ quarkus.log.category.\"org.apache.zookeeper\".level=WARN
# enable health check
quarkus.kafka.health.enabled=true
quarkus.kafka.bootstrap-servers=localhost:19092
kafka.bootstrap.servers=localhost:19092