hivemq-mqtt-client icon indicating copy to clipboard operation
hivemq-mqtt-client copied to clipboard

Consumption of internal memory "User data"

Open acaliaro opened this issue 2 years ago • 3 comments

🐛 Bug Report

We have a production Android application that uses the HiveMQ client for mqtt. We are noticing that on some devices, the "User Data" of the application has reached a size greater than 1.5 GB. I wanted to know if the MQTT client saves data on its DB and possibly if this data is cleaned, or if there is a way to clean them, thanks

Environment

Android 11,

Hardware or Device?

What version of this client are you using? com.hivemq:hivemq-mqtt-client:1.2.1

acaliaro avatar May 18 '23 06:05 acaliaro

Hi @acaliaro - the client doesn't have any internal database or a file store (yet). For higher quality of service levels (QoS 1 + 2), it does keep a limited list of messages that are pending acknowledgement. If you setup manual acknowledgement but not actually acknowledging - that might even be a cause.

Could you tell us a bit more and maybe we can flush out where the problem lies?

pglombardo avatar May 24 '23 10:05 pglombardo

thanks @pglombardo

manual aknowledgemnt... how can I take a look to this?

acaliaro avatar May 24 '23 12:05 acaliaro

Message acknowledgement is automatic unless you decide to handle that on your own - so you would likely already know if your application is doing this. It would require calling message.mqtt5Publish.acknowledge().

An specific example would depend on what interface you are using (blocking, async or reactive) but here is one example in #481. Search the code for acknowledge.

Some other questions to reduce the problem area:

  • Which devices?
    • What versions of android?
  • What activity on those devices?
  • Can you look into that stored user data to see what is there?

pglombardo avatar May 24 '23 14:05 pglombardo

Hi @acaliaro - did you ever make any progress on this issue?

pglombardo avatar Mar 07 '24 09:03 pglombardo

Hi, no. I am not working on the project anymore

acaliaro avatar Mar 07 '24 09:03 acaliaro

Ok - thanks for the update e saluti dalla Sicilia :-)

pglombardo avatar Mar 07 '24 09:03 pglombardo