eclipse-paho / eclipse-paho/paho.mqtt.java
Unable to connect via WebSocket when there is high network latency
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
- [x] Bug exists Release Version 1.2.5 ( Master Branch)
- [?] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [?] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
Hi,
we experience connection issues to MS Azure when using MQTT over WebSocket. I created [this issue](https://github.com/Azure/azure-iot-sdk-java/issues/1648) at the Azure IoT SDK and they suspect that the root cause lies within Paho.
The problem occurs reproducably when there is a network latency close to 300ms or higher. I attached a [debug log](https://github.com/eclipse/paho.mqtt.java/files/10358934/error_log.txt). Pure MQTT (no WebSocket) works fine even with the latency.
To reproduce the problem in a testing environment, I use the following command on a Linux system to induce latency:
```
tc qdisc add dev usb0 root netem delay 300ms
```
The used Paho version is 1.2.5. I am unable to test the latest development snapshot. It seems like the java-parent is missing from the repository.
```
Could not find artifact org.eclipse.paho:java-parent:pom:1.2.6-SNAPSHOT in paho (https://repo.eclipse.org/content/repositories/paho-snapshots/)
```
Contributor guide
Assessment
This issue has not been assessed yet.