# Retention of messages (and removal etc)

**URL:** <https://forum.cedalo.com/t/retention-of-messages-and-removal-etc/568>\
**Category:** MQTT protocol\
**Created:** [June 17, 2022, 2:06pm UTC](https://forum.cedalo.com/t/retention-of-messages-and-removal-etc/568 "2022-06-17T14:06:07Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Tizian](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.cedalo.com/tizian/32/33_2.png) [@Tizian](https://forum.cedalo.com/u/Tizian)\
**Post date:** [January 13, 2025, 8:20am UTC](https://forum.cedalo.com/t/retention-of-messages-and-removal-etc/568/13 "2025-01-13T08:20:57Z")

</div>

Hello JMH,

If you are using the QoS2 level for your messaging, then the broker will keep all the messages in memory, which should be delivered to the subscriber, since it is currently not connected.  
This is why the memory usage will keep increasing over time.

If you want to use this level of QoS it is important to know the hardware limits your broker has and adapt accordingly.  
In the Mosquitto Pro we have a feature, which allows to store messages not only in memory, but also in disc. This helps with memory capacity problems.

> **[Persistent Queueing | Cedalo MQTT Platform](https://docs.cedalo.com/mosquitto/advanced-features/persistent-queueing/)**
>
> In several use cases of an MQTT Message Broker the broker has to deal with unstable or unreliable connectivity.

---

_[View the full topic](https://forum.cedalo.com/t/retention-of-messages-and-removal-etc/568)._
