monitor icon indicating copy to clipboard operation
monitor copied to clipboard

Can I stop the very frequent MQTT connects/disconnects without impacting performance?

Open Eeeeeediot opened this issue 3 years ago • 1 comments

How would I do this please? Also, why is the MQTT client_id different every time it connects.

Screenshot_20210323-201308_Home Assistant

Eeeeeediot avatar Mar 23 '21 20:03 Eeeeeediot

Why do you care? This is the way the mosquitto_pub works. The only way to avoid doing this is to greatly increase the complexity of the application and try to create a background MQTT client process that receives messages and publishes them, which would be more work for virtually no gain other than to make your MQTT logs a tiny bit quieter.

It has virtually zero effect on performance, and is how many/most MQTT clients behave in IoT applications in order to save on batter life.

nateww avatar Apr 18 '21 19:04 nateww