Closed Nerivec closed 3 days 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.
I think the side effects would mainly be memory-related, i.e. buffer size both on the broker and client sides.
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:
mqtt
functions, should fix some promise awaiting weirdness (also allows a nice clean up of tests...)disconnect
event (when usingversion: 5
)Also tested manually on mosquitto and nanomq on top of jest tests...
@Koenkk Some notes:
DISCONNECT
seems to not really be respected by brokers (can't get it to trigger from nanomq when exceeding maximum packet size, it just drops the packet)?disconnect
event... might not reconnect?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