domotruc / jMQTT

Jeedom plugin to interface as a client with an MQTT broker.
16 stars 8 forks source link

on burst of commands, only the last one is sent #23

Closed domotruc closed 6 years ago

domotruc commented 6 years ago

Problem reported on the forum:

Problem understanding: When 2 action commands are sent too close, the plugin creates and connects 2 clients with the same ID. The broker disconnects automatically the oldest one before it can send the command.

Solution: Call the Mosquitto\Client constructor without any argument: the ID will be generated randomly. Or build a unique id.