Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1409 Posts: 7544
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 78 Posts: 343
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: https://xdk.bosch-connectivity.com/community/-/message_boards/message/263880 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.
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.