Maximum message size

I am currently using the cloud platform to send mqtt messages from my esp32 project and configuration messages from node-red to my esp32 project. My messages seem to fail to send when the Serialized JSON is bigger than about 200mb. I don’t see where there is any sort of configuration setting for this in the cloud platform. I would like to increase this limit if possible.

Hi @ndeegan, greetings and welcome to the HiveMQ Community! It’s great to have you here, especially with your interest in MQTT and the HiveMQ broker. We’re always happy to see new users like you.

The MQTT protocol can theoretically handle message sizes up to 256 MB, which is larger than your 200 MB payload. Given that, the issue is likely not with the MQTT protocol or the broker itself, but rather with the network connection between your ESP32 and the broker.

While MQTT supports message sizes up to 268,435,460 bytes (approximately 256 MB), your 200 MB payload is well within this limit.

However, the ESP32 might be experiencing network instability during the transmission of such a large payload. Network issues could cause interruptions, leading to packet loss or timeouts, which would require the transmission to restart from the beginning. Unfortunately, MQTT does not support resuming interrupted uploads, so the entire 200 MB packet will be attempted to be re-transmitted repeatedly if the connection is unstable.

I recommend investigating the network conditions between the ESP32 and the MQTT broker. Ensure that the connection is stable and has sufficient bandwidth to handle large data transmissions.

Additionally, you might consider using MQTT for transferring short commands and using FTP or another protocol that supports resumable uploads for transferring large data. This approach would provide greater reliability and efficiency for both types of communication.

Best,
Dasha form the HiveMQ Team