Skip to content
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

Reactive messaging health check fails if no topic name is specified #768

Closed
andreas-eberle opened this issue Sep 22, 2020 · 6 comments · Fixed by #771
Closed

Reactive messaging health check fails if no topic name is specified #768

andreas-eberle opened this issue Sep 22, 2020 · 6 comments · Fixed by #771
Assignees
Labels
bug Something isn't working kafka on-roadmap The issue is part of the roadmap
Milestone

Comments

@andreas-eberle
Copy link

I'm using smallrye reactive messaging with kafka and have a connection configured without a topic name. This is because I want to send messages to dynamic topics at runtime. My config looks like this

quarkus.kafka.health.enabled=true
kafka.bootstrap.servers=${KAFKA_SERVER:localhost:9092}
mp.messaging.outgoing.events.connector=smallrye-kafka
mp.messaging.outgoing.events.value.serializer=io.quarkus.kafka.client.serialization.ObjectMapperSerializer

and I send messages with an Emitter by adding an OutgoingKafkaRecordMetadata object with the desired topic name.

I now wanted to use the kafka health checks and noticed that the "events" connector is shown as DOWN because its topic cannot be found. However, I never specified a topic.


{
    "status": "DOWN",
    "checks": [
        {
            "name": "SmallRye Reactive Messaging - liveness check",
            "status": "UP",
            "data": {
                "events": "[OK]"
            }
        },
        {
            "name": "Kafka connection health check",
            "status": "UP",
            "data": {
                "nodes": "host.docker.internal:9092"
            }
        },
        {
            "name": "SmallRye Reactive Messaging - readiness check",
            "status": "DOWN",
            "data": {
                "events": "[KO] - Unable to find topic events"
            }
        }
    ]
}

I think this check shouldn't/cannot be done if no topic name is set.

@cescoffier cescoffier added this to the 2.4.0 milestone Sep 22, 2020
@cescoffier cescoffier added bug Something isn't working kafka on-roadmap The issue is part of the roadmap labels Sep 22, 2020
@cescoffier cescoffier self-assigned this Sep 22, 2020
@cescoffier
Copy link
Contributor

Unfortunately, the default topic is the channel name. So it means that I can't distinguish this case.
However, I can add a specific attribute to disable the readiness health check. Would it be ok?

@cescoffier
Copy link
Contributor

@andreas-eberle I've opened the following PR #771.

@andreas-eberle
Copy link
Author

andreas-eberle commented Sep 23, 2020

Yes, that is fine for me. Thanks for making the change so quickly!

@andreas-eberle
Copy link
Author

Just to be sure, the connection health check will still be enabled, correct?

@cescoffier
Copy link
Contributor

cescoffier commented Sep 23, 2020 via email

@cescoffier
Copy link
Contributor

I will revisit a bit the PR, and basically it's #771.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kafka on-roadmap The issue is part of the roadmap
Projects
None yet
2 participants