MQTT Server: MQTT.js or Mosca?

    in MQTT there are two kind of clients, clean and unclean: clean clients need to redo all their subscription when they reconnect, while unclean clients do not. Moreover, if an unclean client do a subscription with qos: 1 and then disconnect, it will receive all the messages that were sent when it was offline. MQTT.js clients are clean by default, so you have to listen to the 'connect' event and do all your subscriptions again.

详细链接: https://github.com/mqttjs/MQTT.js/issues/151

猜你喜欢

转载自hongtoushizi.iteye.com/blog/2191643