Closed Thomseeen closed 5 years ago
Hi @Thomseeen
Indeed there was an issue with publishing longer messages, but it has been resolved in commit https://github.com/espressif/esp-mqtt/commit/e0bbbebc08884118931f7adaedb0b8cba06db00c (from Oct 2018).
Current version shall support up to 4 bytes len, just tested sending a 50k message:
0x30, -> flags
0xdf, 0x86, 0x03 -> size 50015
0x00, 0x0d -> topic len 13
which looks correct
I see. I'm stuck with IDF 3.1 so I have to use https://github.com/espressif/esp-mqtt/tree/ESP-MQTT_FOR_IDF_3.1 which still includes the error. Sorry to bother.
Seems like there is an issue with the remaining length in the messages header. Sending a message with 16kB data and a topic length of 11B causes the header to be
which works fine and is right according to MQTT 3.1. Sending a message with 17kB data and a topic length of 11B causes the header to be
The library only seems to distinguish between a remaining length field with 1 or 2 bytes while the standard describes a field length of up to 4 bytes.