Skip to content

Commit

Permalink
Merge pull request #42746 from kdurnoga/fix-mqtt-dev-services
Browse files Browse the repository at this point in the history
Fix MQTT dev services always start if there is another connector present
gsmet authored Aug 25, 2024
2 parents 1b5ea2d + 52c19da commit 6e1b154
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -203,14 +203,13 @@ private boolean hasMqttChannelWithoutHostAndPort() {
boolean isIncoming = name.startsWith("mp.messaging.incoming.");
boolean isOutgoing = name.startsWith("mp.messaging.outgoing.");
boolean isConnector = name.endsWith(".connector");
boolean isConfigured;
if ((isIncoming || isOutgoing) && isConnector) {
String connectorValue = config.getValue(name, String.class);
boolean isMqtt = connectorValue.equalsIgnoreCase("smallrye-mqtt");
boolean hasHost = ConfigUtils.isPropertyNonEmpty(name.replace(".connector", ".host"));
boolean hasPort = ConfigUtils.isPropertyNonEmpty(name.replace(".connector", ".port"));
isConfigured = isMqtt && (hasHost || hasPort);
if (!isConfigured) {
boolean isConfigured = hasHost || hasPort;
if (isMqtt && !isConfigured) {
return true;
}
}

0 comments on commit 6e1b154

Please sign in to comment.