continue;
} else {
logger.trace("Processing property: {} = {}", key, value);
}
MqttBrokerConnection conn = brokerConnections.get(name);
if (conn == null) {
conn = new MqttBrokerConnection(name);
brokerConnections.put(name, conn);
}
if (property.equals("url")) {
conn.setUrl(value);
} else if (property.equals("user")) {
conn.setUser(value);
} else if (property.equals("pwd")) {
conn.setPassword(value);
} else if (property.equals("qos")) {
conn.setQos(Integer.parseInt(value));
} else if (property.equals("retain")) {
conn.setRetain(Boolean.parseBoolean(value));
} else if (property.equals("async")) {
conn.setAsync(Boolean.parseBoolean(value));
} else if (property.equals("clientId")) {
conn.setClientId(value);
} else if (property.equals("lwt")) {
MqttWillAndTestament will = MqttWillAndTestament.fromString(value);
logger.debug("Setting last will: {}", will);
conn.setLastWill(will);
} else if (property.equals("keepAlive")) {
conn.setKeepAliveInterval(Integer.parseInt(value));
} else {
logger.warn("Unrecognized property: {}", key);
}
}
logger.info("MQTT Service initialization completed.");