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

subscribe() is synchronous/blocking on retained messages

Open keyeh opened this issue 9 years ago • 0 comments

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?

keyeh avatar Feb 11 '17 20:02 keyeh