andrewjfreyer / monitor

Distributed advertisement-based BTLE presence detection reported via mqtt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Eeeeeediot opened this issue · comments

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

Screenshot_20210323-201308_Home Assistant

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.