paho.mqtt.javascript
paho.mqtt.javascript copied to clipboard
subscribe() is synchronous/blocking on retained messages
It appears that Paho.MQTT.Client.subscribe() method will block until all of the retained messages have been received.
Subscribing to a wildcard topic with about 40 retained messages will cause Paho to block everything for about 5 seconds.
Is there a way to subscribe that is nonblocking/async? Or can I run Paho in a web worker?