Re: [quarkus-dev] Health check behavior - Can Readiness, Liveness check made active/inactive by configuration

317 views
Skip to first unread message

Stuart Douglas

unread,
Feb 24, 2021, 7:26:03 PM2/24/21
to anu...@gmail.com, Quarkus Development mailing list
This sounds like a bug, if Kafka is not configured IMHO the health check should not be configured either.

That said you should be able to disable it with quarkus.kafka.health.enabled=false

Stuart

On Thu, 25 Feb 2021 at 10:18, Anumodh N <anu...@gmail.com> wrote:
Hi Quarkus team,

 I am creating a ingestion gateway, which sends data to kafka or another REST endpoint. I have added "quarkus-smallrye-reactive-messaging-kafka" and "quarkus-reactive-messaging-http" dependencies to the project. I wanted to have only one particular pipeline ie http->kafka or http->http at a time, but I should be able to change that using configuration update followed by restart. I could achieve this by adding 2 dependencies and configurations as shown below

## Rest service configuration
mp.messaging.outgoing.messages.connector=smallrye-http
mp.messaging.outgoing.messages.method=POST
mp.messaging.outgoing.messages.url=http://localhost:9009/messages

## Kafka Ingestion configuration
## ----------------------------
#mp.messaging.outgoing.messages.connector=smallrye-kafka
#kafka.bootstrap.servers=host.docker.internal:9092
#mp.messaging.outgoing.messages.topic=messages
#mp.messaging.outgoing.messages.value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer


Now the problem is that even though I have Kafka connector is commented out, the health check shows that Kafka is down. I expect that it should not run the Kafka health check . But is there a way to make tests active/inactive by a configuration ?

Regards,
Anumodh

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/2bd6da81-d1e2-4f7b-b368-6916c01b6aa4n%40googlegroups.com.

Anumodh N

unread,
Feb 24, 2021, 9:05:54 PM2/24/21
to Quarkus Development mailing list
After noticing that this a development forum, I created a StackOverflow question regarding this https://stackoverflow.com/q/66360289/3573604

Thank you Stuart.  I tried "quarkus.kafka.health.enabled=false" , but looks like its failing

> http localhost:8080/q/health/live

HTTP/1.1 503 Service Unavailable
content-length: 244
content-type: application/json; charset=UTF-8

{
    "checks": [
        {
            "data": {
                "kafka-connector": "[KO]"
            },
            "name": "SmallRye Reactive Messaging - liveness check",
            "status": "DOWN"
        }
    ],
    "status": "DOWN"
}

My application.properties looks like below

## Base quarkus configuration
## -------------------------
quarkus.vertx.prefer-native-transport=true
quarkus.http.so-reuse-port=true
quarkus.http.tcp-quick-ack=true
quarkus.http.tcp-cork=true
quarkus.http.tcp-fast-open=true
quarkus.kafka.health.enabled=false

## Logs
## ----
#quarkus.log.console.enable=true
#quarkus.log.file.enable=true
quarkus.log.level=DEBUG
mp.openapi.extensions.smallrye.openapi=3.0.3

## REST Ingestion configuration
## -----------------------------
mp.messaging.outgoing.metrics.connector=smallrye-http
mp.messaging.outgoing.metrics.method=POST
mp.messaging.outgoing.metrics.url=http://localhost:9090/test

## Kafka Ingestion configuration
## ----------------------------
#mp.messaging.outgoing.metrics.connector=smallrye-kafka
#kafka.bootstrap.servers=host.docker.internal:9092
#mp.messaging.outgoing.metrics.topic=metrics
#mp.messaging.outgoing.metrics.value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer
Reply all
Reply to author
Forward
0 new messages