# Retaining last payload

**URL:** https://discourse.nodered.org/t/retaining-last-payload/47714
**Category:** General
**Created:** [27 June 2021 13:43 UTC](https://discourse.nodered.org/t/retaining-last-payload/47714 "2021-06-27T13:43:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Automationguy](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Automationguy](https://discourse.nodered.org/u/Automationguy)
#### Post date: [27 June 2021 13:43 UTC](https://discourse.nodered.org/t/retaining-last-payload/47714/1 "2021-06-27T13:43:13Z")

</div>

Hi all,

I have a tcp modbus device that communicates to other devices via rf. on occasion we have rf interference causing communication dropouts.

Each payload is sent to a cloud. When the drop out occurs msg.payload will be sent = 0 causing inconsistent data on the cloud.

Is there a way of retaining a payload until the next successful connection & var is received?

Thanks In advance.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 June 2021 20:58 UTC](https://discourse.nodered.org/t/retaining-last-payload/47714/2 "2021-06-27T20:58:05Z")

</div>

Maybe I don't fully understand the question, but would it be better to send nothing when the problem occurs, and send the next good data when it arrives?

---

<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 August 2021 20:58 UTC](https://discourse.nodered.org/t/retaining-last-payload/47714/3 "2021-08-26T20:58:16Z")

</div>

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