8kb is default.
Not sure about his one though; Also note that the payload is send in one package. Means on the sending AND receiving side you must have enough RAM to send/get the package.
You can set the size with.
I have my own MqttBroker running (v2 in B4J). broker.Initialize("", 51041) 'first parameter is the event name. It is currently not used. broker.DebugLog = True broker.Start StartMessageLoop 'Non-UI app When I send a message like this one: Type MQTTFilePartMessage (PartNumber As...
www.b4x.com
For user experience you should split the file on serverside and send only small packages. I don´t think it is suitable to send tens of MBs in one payload.
One Solution (you don´t need to change the default payloadsize at all with it).
Split the original file in small parts of 8, 16, 32 kb...
Create a customtype with file to send, amount of parts, one part of the file as bytearray.
Serialize the customtype. Send the serialized payload. Send all 1587 (just an example) parts of that file....
On receiverside you get the serialized payload, get the nr and amount of parts you need.
Store them until you know you have all parts. Rebuild the originalfile based on the parts you received.