Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to publish very large payloads (e.g. images) #249

Closed
plcengineer opened this issue May 22, 2021 · 4 comments
Closed

Unable to publish very large payloads (e.g. images) #249

plcengineer opened this issue May 22, 2021 · 4 comments

Comments

@plcengineer
Copy link

In preparation of data transmitting, the client copies the given payload into an internal buffer. This action causes the usage of huge memory and data redundancy.
In my case, I would send an PNG image recorded with the ESP32-Cam Module. So the payload comes from the camera memory as pointer and without the need of copying the whole frame buffer.

@plcengineer
Copy link
Author

In preparation of data transmitting, the client copies the given payload into an internal buffer. This action causes the usage of huge memory and data redundancy.
In my case, I would send an PNG image recorded with the ESP32-Cam Module. So the payload comes from the camera memory as pointer and without the need of copying the whole frame buffer.

--> Made a possible solution in my fork of this very good library: see last commits: https://github.com/plcengineer/arduino-mqtt

@256dpi
Copy link
Owner

256dpi commented May 28, 2021

Yes this would be nice to get fixed. Possibly we could do this together with #145. In any case this should be first implemented in lwmqtt.

@plcengineer
Copy link
Author

That would be great. I could add some sort of solution for reading too. But I would need a bit more time. Until now, I looked for an hour in your code.. Maybe next week I can dive a bit deeper.

@256dpi
Copy link
Owner

256dpi commented Feb 5, 2023

With the latest update of lwmqtt, message payloads are now sent directly and not written to the write buffer anymore. Therefore, very large payloads are possible now. The feature is planned to be available with the next release (2.6).

@256dpi 256dpi closed this as completed Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants