espressif / esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
Apache License 2.0
257 stars 154 forks source link

Beta -- MQTT Buffer is way too small for receiving serious data... (CA-171) #78

Open SolidStateLEDLighting opened 2 years ago

SolidStateLEDLighting commented 2 years ago

When you are working with Fleet Provisioning, your MQTT buffer has to be 4096 or you will not receive any payload. The typical byte count for receiving certs and key is nearly 4k.

My complaint is there is no way to detect this error. The software doesn't complain about trying to receive a message that is too large for the buffer and so the user just doesn't know what the problem is.

You have that CONFIG_MQTT_NETWORK_BUFFER_SIZE limited to a maximum size of 2048 in the Kconfig.projbuild file. That entry should be changed to accept a maximum of 4096 as below. AND you should try to include some kind of warning the leads a customer into understanding that there is a buffer over-run so they know to increase that buffer size. This is an old problem that has not been handled in a way that lends guidance.

config MQTT_NETWORK_BUFFER_SIZE int "Size of the network buffer for MQTT packets" range 1024 4096 default 1024 help Size of the network buffer for MQTT packets.