eclipse-paho / eclipse-paho/paho.mqtt.java

`MqttConnectionOptions` docs lie about default automatic reconnect

Open
#974 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

The docs on top of the class say that, by default:

https://github.com/eclipse/paho.mqtt.java/blob/f4e0db802a4433645ef011e711646a09ec9fae89/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java#L49

But guess what? The default value is no automatic reconnection:

https://github.com/eclipse/paho.mqtt.java/blob/f4e0db802a4433645ef011e711646a09ec9fae89/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java#L61

To double-check:

```java
var options = new MqttConnectionOptions();
System.out.println("isAutomaticReconnect? " + options.isAutomaticReconnect()); // Prints "false".
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.