mirror of
https://github.com/jlengrand/quarkus.git
synced 2026-03-10 08:41:22 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user