Maximum MQTT Payload publish size
29.08.19 15:39

Hi Everyone,

I am trying to send multiple sensor samples as a JSON string using the MQTT protocol. I want to acquire sensor samples every 10ms, however, I want to publish the MQTT payload every 5 seconds. Therefore, I am storing the sensor values in a buffer until I transmit the buffer every 5 seconds.

I came across this: thread on XDK portal suggests that only 997 bytes of MQTT payload can be transmitted. However, the mentioned thread is from 2017, therefore, I wanted to ask if this limitation 997 bytes still relevant  ?. If so, is there any way to transmit the MQTT payload >1000 bytes.


Kind regards,

Muhammad Salman Shaukat

0 (0 Stimmen)
RE: Maximum MQTT Payload publish size
03.09.19 06:26 als Antwort auf Muhammad Salman Shaukat.

Hi Muhammad Salman Shaukat,

In XDK, MQTT payload length is limited to 997 bytes. So, it won't publish if the payload length is more than this limit.

If the payload length > 1000 bytes then split the message and publish it. For example, for 1000 bytes payload, split it into 500 bytes of two payloads and publish it.

Thanks And Regards,

Vijaya Kumar B.

0 (0 Stimmen)