Skip to content

Commit

Permalink
Fix MQTT dev services always start if there is another connector present
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Durnoga committed Aug 24, 2024
1 parent 27514a6 commit 52c19da
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 52c19da

Please sign in to comment.