Closed Dieken closed 3 years ago
/cc @mkouba
It should be labeled area/reactive-messaging. CC @Ladicek @cescoffier @manovotn
I think the common naming style would actually be mp.messaging.incoming|outgoing.<channel>.enabled
, and the default would of course be true
. Other than that, this seems quite sensible to me. WDYT @ozangunalp?
Funny enough there already is an option to disable a channel with mp.messaging.incoming|outgoing.<channel>.enabled=false
. It prevents the channel from being registered.
And my bad that it is not documented inside the Kafka reference guide. I don't think that it is in Microprofile Reactive Messaging spec.
@Dieken can you give it a try and tell us if it works you'd expect?
@ozangunalp it does disable the channel 😄
But it makes health check failed even with mp.messaging.incoming.my-topic.health-enabled=false
:
curl localhost:8080/q/health
{
"status": "DOWN",
"checks": [
{
"name": "SmallRye Reactive Messaging - liveness check",
"status": "DOWN",
"data": {
"kafka-connector": "[KO]"
}
},
{
"name": "Database connections health check",
"status": "UP"
},
{
"name": "Reactive MySQL connections health check",
"status": "UP",
"data": {
"<default>": "up"
}
},
{
"name": "SmallRye Reactive Messaging - readiness check",
"status": "DOWN",
"data": {
"kafka-connector": "[KO]"
}
}
]
}
I hope it says "[OK] - no subscription yet, so no connection to the Kafka broker yet" like this:
curl localhost:8080/q/health
{
"status": "UP",
"checks": [
{
"name": "SmallRye Reactive Messaging - liveness check",
"status": "UP",
"data": {
"qieman-user": "[OK]"
}
},
{
"name": "Database connections health check",
"status": "UP"
},
{
"name": "Reactive MySQL connections health check",
"status": "UP",
"data": {
"<default>": "up"
}
},
{
"name": "SmallRye Reactive Messaging - readiness check",
"status": "UP",
"data": {
"qieman-user": "[OK] - no subscription yet, so no connection to the Kafka broker yet"
}
}
]
}
@Ladicek
Sounds like a bug to me. Disabled channels IMHO shouldn't participate in health at all.
OK so this is clearly a case of connector existing, but having no sources nor sinks. Precisely what I thought shouldn't exist :-)
This PR to Reactive Messaging should fix that: https://github.com/smallrye/smallrye-reactive-messaging/pull/1346
This PR to Reactive Messaging should fix that: smallrye/smallrye-reactive-messaging#1346
Great! Hope this is included in Quarkus >= 2.1.2.Final with smallrye-reactive-messaging 3.9.0, currently Quarkus 2.1.1.Final ships smallrye-reactive-messaging 3.7.1.
This will be fixed by upgrading to SmallRye Reactive Messaging 3.9.0, which should hopefully happen in Quarkus 2.2.
Just to answer @ozangunalp question, the 'enabled' channel is not part of the spec. This is smallrye specific.
Description
This is to seek a specific solution for https://github.com/quarkusio/quarkus/issues/19278.
I have a simple Quarkus app that includes both HTTP API and Kafka consumer, I would like to run a HTTP API only version and a fully version in my K8S cluster. Because the code base is very small, I don't want to separate code into three jars: common service jar + http resource jar + kafka consumer jar. Because I don't hope the Kafka consuming issue affects HTTP API service performance and stability, I want that HTTP API only version.
So I want a switch to disable
@Incoming
:application.properties:
Implementation ideas
Add a new runtime config property like
mp.messaging.incoming.[TOPIC].disabled
with default valuefalse
.