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

Packet size and data type #299

Open
dacattack opened this issue Aug 22, 2023 · 3 comments
Open

Packet size and data type #299

dacattack opened this issue Aug 22, 2023 · 3 comments

Comments

@dacattack
Copy link

While conducting tests with the AsyncMqttClient library, I've discovered that sending messages larger than 5500 bytes (the exact limit is uncertain, but it's approximately around that value) is not feasible. However, I couldn't locate any options to adjust this packet size limit within the library. My expectation was to find a label similar to what exists in the PubSubClient library.

Another concern I have pertains to the necessity of transmitting messages solely as char arrays. Unfortunately, there isn't a function variant available that would allow the transmission of a uint8_t array. This particular functionality is crucial, especially when sending certain types of data—such as substantial arrays of WAV-encoded audio data captured from an I2S MEMS microphone.

It's quite likely that these two features I've highlighted can be potentially integrated in some manner so I'll be glad to hear from someone with experience on the library.
Thanks.

@luebbe
Copy link
Collaborator

luebbe commented Aug 22, 2023

You may want to take a look at https://github.com/bertmelis/espMqttClient, which is a plug in replacement for async-mqtt-client and much more stable.
I don't know on which device you are trying to send big messages, but you are hopefully aware that ram is not counted in GB on embedded devices? ;)

@dacattack
Copy link
Author

I'll have a look and test that library. I was using AsyncMqttClient instead of PubSubClient because it was way faster sending packages but I found those obstacles.
I'm a electronic engineer student working on his final degree project using the ESP32 microcontroller so yeah, I have a pretty good idea about the ram usage....

@luebbe
Copy link
Collaborator

luebbe commented Aug 23, 2023

Good that you know. We had questions of this kind coming in, where people were obviously not aware of the difference between KB and GB ;)
espMqttClient may seem to send slower than AsyncMqttClient, but IIRC this is because Bert hast implemented correct qos handling.

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