When trying to use auto reconnect feature with the mqtt-plugin, it does not work for the hivemq client implementation in the following 2 scenarios:
when setting max reconnect attempts to -1 (infinite) it does not work because of this piece of code in HiveMQTTClient:
if (parameters.getReconnectMaxAttempts() > 0) {
builder = builder.automaticReconnectWithDefaultConfig();
}
when using authentication, the mqtt reconnector does not inherit the credentials used at the initial connection, because those are set when connection is made and not when client is initially configured.
In order for the MqttClientReconnector to inherit the authentication, it is necessary to configure authentication prior to configuring the automatic reconnect.
When trying to use auto reconnect feature with the mqtt-plugin, it does not work for the hivemq client implementation in the following 2 scenarios: