|
|
|
@ -38,11 +38,10 @@ public class MqttConfig {
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public MqttClient mqttClient(MqttConnectOptions options) throws MqttException {
|
|
|
|
|
if (!enable) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
MqttClient client = new MqttClient(broker, clientId);
|
|
|
|
|
client.connect(options);
|
|
|
|
|
if (enable) {
|
|
|
|
|
client.connect(options);
|
|
|
|
|
}
|
|
|
|
|
return client;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|