# Using MQTT retained messages to store state between reboots

**URL:** <https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234>\
**Category:** General\
**Created:** [25 May 2021 19:58 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234 "2021-05-25T19:58:32Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [25 May 2021 21:35 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234/21 "2021-05-25T21:35:18Z")

</div>

Node-RED has default MQTT nodes for communicating to and from any broker

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/29f3f6cfcc0d4405618bd2dd6345373f7e21729b.png)

---

<div class="post-metadata">

**Author:** ![skybadger](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@skybadger](https://discourse.nodered.org/u/skybadger)\
**Post date:** [25 May 2021 21:36 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234/22 "2021-05-25T21:36:46Z")

</div>

It must just be the broker which is a contrib then . I'm familiar with those nodes.  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [25 May 2021 21:38 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234/23 "2021-05-25T21:38:49Z")

</div>

> [@skybadger](#):
>
> s there a recommended palette node for working with mosquitto from node-red ?

The mosquitto broker has to be configured "manually" by editing a config file- it doesn't have a nice GUI ☹

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 May 2021 21:41 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234/24 "2021-05-25T21:41:09Z")

</div>

Just to be clear, mosquito is a stand alone application that is not part of node-red. You can use mosquitoes mqtt without node-red. Node-red will just be another client of the mosquito broker.

---

<div class="post-metadata">

**Author:** ![skybadger](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@skybadger](https://discourse.nodered.org/u/skybadger)\
**Post date:** [27 May 2021 17:32 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234/25 "2021-05-27T17:32:53Z")

</div>

I'm sure I can muddle through that.  
Its tomorrow's problem now.  
Thanks again

---

<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:** [26 July 2021 17:33 UTC](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234/26 "2021-07-26T17:33:18Z")

</div>

Closed on 26 July 2021 17:33 UTC

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

[Previous page](https://discourse.nodered.org/t/using-mqtt-retained-messages-to-store-state-between-reboots/46234.md?page=1)
