Roberto Pozzi
Roberto Pozzi

Reputation: 77

IoT Foundation payload limit, what is the shortest byte array I can send?

I am using IoT Foundation on Bluemix and trying to send a byte array representing a simple text file, whose size is only 1354 bytes. I do not see anything arriving on IoT Foundation, it looks like I am hitting the 4KB payload limit (IoT Foundation doc). The shortest byte array I am able to send is only 1349 bytes. Is this a limitation of current IoT Foundation implementation?

Upvotes: 0

Views: 75

Answers (1)

Paul Slater
Paul Slater

Reputation: 451

there is a payload limit of 4096 bytes. If you attempt to send a message with a payload greater than this, the connection will simply be terminated.

If you are sending JSON, don't forget that the JSON syntax is included (including pretty printing) in the payload size. With a pure binary payload you will be able to send a payload of exactly 4096, but you will have to calculate the size in bytes of any string (after encoding) that you send.

Please can you double check how large the payload is and confirm it really is less than 4096 bytes ?

thanks

Paul

Upvotes: 1

Related Questions