Nick Schriever
Nick Schriever
Based on what's being said here https://www.eclipse.org/forums/index.php/t/1070780/, the client needs to reconnect after the keep-alive interval has passed. However, with the automaticReconnect flag set to true I expect the paho.MqttClient...
@bertrik ``` private void publish(byte[] payloadToPublish, MqttConnectOptions mqttOptions) { try { MqttMessage message = new MqttMessage(payloadToPublish); this.mqttClient.publish('myTopic', message); } catch (MqttException exception) { this.forceReconnect(mqttOptions); } } ``` And a `forceReconnect()`...
Very nice find @bertrik! Small but crucial nuance that probably took quite some time. Big thanks for sharing your analysis!