# How to manage data cache when disconnected from the Cloud

**URL:** <https://discourse.nodered.org/t/how-to-manage-data-cache-when-disconnected-from-the-cloud/80882>\
**Category:** General\
**Tags:** mqtt\
**Created:** [29 August 2023 10:36 UTC](https://discourse.nodered.org/t/how-to-manage-data-cache-when-disconnected-from-the-cloud/80882 "2023-08-29T10:36:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federica](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@Federica](https://discourse.nodered.org/u/Federica)\
**Post date:** [29 August 2023 10:36 UTC](https://discourse.nodered.org/t/how-to-manage-data-cache-when-disconnected-from-the-cloud/80882/1 "2023-08-29T10:36:41Z")

</div>

Hi everyone,  
is there a way to manage the data to be sent to the Cloud in case the system is disconnected from the network? For example, if we want to publish data on AWS via MQTT protocol, it is necessary to study how to manage the publication queue to ensure that in the event of a connection loss, upon reconnection all unsent data is then correctly published on the CLOUD.

You need to have some sort of local cache that only holds unsent data.

How can this be done? Are there any examples?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 August 2023 11:04 UTC](https://discourse.nodered.org/t/how-to-manage-data-cache-when-disconnected-from-the-cloud/80882/2 "2023-08-29T11:04:54Z")

</div>

> [@Federica](#):
>
> need to have some sort of local cache that only holds unsent data.
> 
> How can this be done? Are there any examples?

There are quite a few topics covering this scenario on the forum. example: [Node-red-contrib-msg-queue - Only storing not forwarding w/ active connection - #11 by Colin](https://discourse.nodered.org/t/node-red-contrib-msg-queue-only-storing-not-forwarding-w-active-connection/44274/11)

---

<div class="post-metadata">

**Author:** ![Federica](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@Federica](https://discourse.nodered.org/u/Federica)\
**Post date:** [31 August 2023 08:14 UTC](https://discourse.nodered.org/t/how-to-manage-data-cache-when-disconnected-from-the-cloud/80882/3 "2023-08-31T08:14:10Z")

</div>

It was just what I needed. Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 September 2023 08:14 UTC](https://discourse.nodered.org/t/how-to-manage-data-cache-when-disconnected-from-the-cloud/80882/4 "2023-09-14T08:14:12Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
