Might work better if I pass in the password as the password and not the username. Oops.

This commit is contained in:
mmilligan 2021-02-21 19:34:15 -06:00
parent ea07715c46
commit 23026d055f

View File

@ -23,7 +23,7 @@ public class MqttPoster {
if (NullUtils.isNotEmpty(_config.getMqttUserName()))
options.setUserName(_config.getMqttUserName());
if (NullUtils.isNotEmpty(_config.getMqttPassword()))
options.setUserName(_config.getMqttPassword());
options.setPassword(_config.getMqttPassword().toCharArray());
c.connect(options);
} catch (MqttException e) {
LOG.error("Failed to create MQTT client", e);