Closed sheffieldnikki closed 1 year ago
Agree on this, i'm trying to send a large base64 image from PSRAM to the cloud, and my device subscribe nothing. So I need maximum memory buffer to send not to receive.
This has been added in e7c5bb0. Will be available with the next release (2.6).
It isn't clear from the
README.md
, but setting a larger buffer size. eg,MQTTClient client(2048)
creates TWO buffers: a read buffer of 2049 bytes and a separate write buffer of 2048 bytes.It would be worth updating the documentation to mention this, and also to provide an optional 2nd argument for setting different buffer sizes. eg,
A typical use case would be IoT devices that publish large packets of data but don't subscribe to anything, or only ever receive small packets. For large buffers this would give a useful memory saving.