paho.mqtt.java icon indicating copy to clipboard operation
paho.mqtt.java copied to clipboard

Unable to connect via WebSocket when there is high network latency

Open sesu-bio opened this issue 3 years ago • 2 comments

  • [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 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. 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/)

sesu-bio avatar Jan 06 '23 09:01 sesu-bio

I can also report to have this issue, blocking the usage of MQTT over WebSockets with MS Azure. Would highly appreciate a fix here. I could help if someone would know where to start or what possibly could be the issue here.

Xerxekyran avatar Jul 13 '23 11:07 Xerxekyran

I was also able to reproduce this error by using MQTT over WebSockets in my test environment. This seems to be a relevant bug and should be handled with higher priority.

dazwi-bio avatar Aug 03 '23 07:08 dazwi-bio