Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.19k stars 1.68k forks source link

fix: Use built-in async for mqtt #24786

Closed Nerivec closed 3 days ago

Nerivec commented 1 week ago

Also tested manually on mosquitto and nanomq on top of jest tests...

@Koenkk Some notes:

Ref: https://www.emqx.com/en/blog/mqtt5-new-features-reason-code-and-ack

Re https://github.com/Koenkk/zigbee2mqtt/issues/24625

CC: @corporategoth @mundschenk-at

Docs https://github.com/Koenkk/zigbee2mqtt.io/pull/3228

corporategoth commented 1 week ago

I should note that the default max packet size on EMQX is 1mb. So probably want to lower the default size we send to 1mb. Also, might not be a bad idea to make that a configurable option in the MQTT settings.

mundschenk-at commented 6 days ago

I think the side effects would mainly be memory-related, i.e. buffer size both on the broker and client sides.

Nerivec commented 6 days ago

With the configurable setting, and the logging on disconnect with reason, it should be easy enough to track down and fix improper configurations. Allowing to leave the default at 1MB (which already amounts to roughly 3.5KB per device * 300 devices for /bridge/devices... should cover most networks with ease).

FYI, broker defaults seem to be: