# \[FEATURE\] Allow reference tags to receive backfill data from sources like MQTT tags

**URL:** <https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261>\
**Category:** Ignition\
**Created:** [June 28, 2021, 7:43am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261 "2021-06-28T07:43:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 28, 2021, 7:43am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/1 "2021-06-28T07:43:51Z")

</div>

At the moment, if you have MQTT Engine connected to a device, and Ignition reference tags to reference the MQTT tags with history on, backfill data from MQTT doesn’t transfer to the reference tag if the connection to the MQTT device goes down.  
If you enable history on the MQTT tag itself, then it backfills fine once connection to the MQTT device is re-established.

It would be great if this backfill data was transferred across to the tag(s) that reference it.

Idea: [Allow reference tags to receive backfill data from sources like MQTT tags | Voters | Inductive Automation](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags)

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [October 22, 2021, 8:37am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/2 "2021-10-22T08:37:51Z")

</div>

That would be nice!

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [October 22, 2021, 8:54am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/3 "2021-10-22T08:54:45Z")

</div>

This is possible to impliment this via scripting,we have this feature working ,where the mqtt history of tag is backfilled and then is copied to any tag that references it.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [November 2, 2021, 1:06pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/4 "2021-11-02T13:06:59Z")

</div>

This is build into Ignition now. I have tested this and seems to work perfectly.  
You need to set this property on the MQTT Engine:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/1/41c7afb1dd7627ba88d426a80b1a0bfd08bba1a8.png)  
and this one on your reference tag provider:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3efe2646787eb670e98ed1ea985442971de8f6e2.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 2, 2021, 7:41pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/5 "2021-11-02T19:41:56Z")

</div>

So you’ve tested this with reference tags that reference mqtt tags, and the reference tags receive backfilled history in the case of a drop out?

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 2, 2021, 8:33pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/6 "2021-11-02T20:33:49Z")

</div>

So I updated to 4.0.9 from the Ignition modules download page and I can’t find the “Allow Back fill data”. Is there some version I’m not seeing? What version are you running of the engine and transmission?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 2, 2021, 8:36pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/7 "2021-11-02T20:36:52Z")

</div>

Not built into MQTT, but built into the Ignition platform.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [November 3, 2021, 7:40am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/9 "2021-11-03T07:40:57Z")

</div>

Exactly!!

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [November 3, 2021, 7:43am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/10 "2021-11-03T07:43:06Z")

</div>

It’s a setting on your tag provider.  
I’m running 8.1.10 and 4.0.9.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 3, 2021, 4:41pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/11 "2021-11-03T16:41:39Z")

</div>

OK, I’ve checked both boxes, and even restarted Ignition and still can’t get it to work. I’m just using the simulator on my desktop but running Ignition 8.1.11 and 4.0.9 of the plugins. To test it I just disabled the Engine which causes the Transmission to start storing the data. I let it sit for a bit and re-enalbed the Engine and my MQTT history fills in, but my tag referencing the MQTT tag never does.

Am I missing something else?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c8fff130ac08795db2c661e7dbcba05961a73a05.png)

---

<div class="post-metadata">

**Author:** ![dpitzer](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpitzer](https://forum.inductiveautomation.com/u/dpitzer)\
**Post date:** [February 3, 2022, 12:35am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/12 "2022-02-03T00:35:30Z")

</div>

I’m also experiencing some unexpected behavior when forwarding data to reference tags. It looks like I’m only getting 2 minutes of backfill. This graph shows the source tag (Blue) with all the forwarded data backfilled, a derived tag (Red) with none of the historical backfilled, and a reference tag (Green) with only two minutes of backfilled data. Is this a setting I can adjust somewhere?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/f/2f12bfc39004b4225cda4bf421e25264fddc5407.png)  
I am running version 8.1.10

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 3, 2022, 12:51am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/13 "2022-02-03T00:51:02Z")

</div>

How long have you waited? I think backfill data arrives really slowly (from what colleagues have said)🤷‍♂️

---

<div class="post-metadata">

**Author:** ![dpitzer](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpitzer](https://forum.inductiveautomation.com/u/dpitzer)\
**Post date:** [February 3, 2022, 3:22pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/14 "2022-02-03T15:22:48Z")

</div>

So far it has been 15 hours.

---

<div class="post-metadata">

**Author:** ![dpitzer](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dpitzer](https://forum.inductiveautomation.com/u/dpitzer)\
**Post date:** [February 11, 2022, 4:41pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/15 "2022-02-11T16:41:17Z")

</div>

I have gotten some clarity on this. The key is that all data should come into the system in chronological order. If that condition is met then all data will propagate to the correct history locations - including any reference tags that use that tag source.  
If a data point comes into the system with a timestamp older than the current value’s timestamp you have two choices: 1. Ignore the timestamp and treat it like it is “now” data. 2. Enable back fill on the provider so that the timestamp is respected, but if it is older than the current value, it will only go into history and not update the tag value. That means that any reference tags that used that tag source will never see the value and therefore never make it into history.  
So in summary - as long as the forwarded data comes in chronologically, everything will work by default (even without the backfill option enabled).

---

<div class="post-metadata">

**Author:** ![jhottell](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jhottell/32/6472_2.png) [@jhottell](https://forum.inductiveautomation.com/u/jhottell)\
**Post date:** [January 12, 2025, 2:15am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/16 "2025-01-12T02:15:41Z")

</div>

I have spent all too many hours over the years remembering how to get store-and-forward to work with Reference tags/UDT instances to not write this down. If anyone has corrections or suggestions let me know and I will test it out and update with my findings.

Steps necessary to get store-and-forward backfill into Reference tags i.e. UDT instances with references to MQTT Engine data source tags. Note, this may not work with expression or derived tags? MQTT Engine tags are ephemeral even though you have the option to enable history, make changes to settings, set alarms etc. Treat MQTT Engine tags as data sources similar to browsing OPC data.

**Main Ignition**

- Tags  
○ UDTs and UDT Instance Reference tags: Enable tag history (obviously).
- All Tag Providers  
○ Allow Back-fill Data: In advanced settings, enable "Allow Back-fill Data" which can allow data to come in out of order.
- MQTT Engine  
○ (Required) DISABLE "Store Historical Events". This is a common error as one would assume storing historical events would be a good thing. If enabled it will backfill store-and-forward data directly to the DB for MQTT Engine tags… if history is enabled on said MQTT Engine tags. This will NOT pass data on to Reference tags pointing to the MQTT Engine tags. You can prove this by enabling history on the MQTT Engine tag and trend it alongside the Reference tag.

**Ignition Edge**

- MQTT Transmission History  
○ (Optional) Edit your "Default In-Memory Store" and set it to be "Disk Backed". This is a good idea as your edge node is likely memory constrained.
- MQTT Transmission Transmitter Settings  
○ Discovery Delay: (Optional ) 10,000. Maybe a good idea if your consuming Ignition system has a lot of tags.  
○ History Store: (Required) Select a history store  
○ Enable History Storage by Default: True  
○ In-Order History: (Optional) With "Allow Back-fill Data'" enabled in the tag providers this option is not required.

---

<div class="post-metadata">

**Author:** ![Theodorska](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@Theodorska](https://forum.inductiveautomation.com/u/Theodorska)\
**Post date:** [January 17, 2025, 9:31am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/17 "2025-01-17T09:31:37Z")

</div>

Thank you!  
However, what if we have history enabled directly on some incoming MQTT tags, but for other mqtt tags we use reference tags with history enabled. Wouldn't this cause a conflict with "DISABLE "Store Historical Events"." ? Meaning that you can either have store and forward working with either reference tags or directly MQTT tags.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [January 17, 2025, 1:26pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/18 "2025-01-17T13:26:29Z")

</div>

For what it's worth, I never use MQTT tags directly and use only reference tags to refer to the MQTT engine tags. If you standardize on one way or the other it simplifies things.

---

<div class="post-metadata">

**Author:** ![Theodorska](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@Theodorska](https://forum.inductiveautomation.com/u/Theodorska)\
**Post date:** [March 5, 2025, 7:12am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/19 "2025-03-05T07:12:34Z")

</div>

Are there settings on the tags in reference provider that needs to be set in order to optimize store and forward? We were ones told to have these settings in order to optimize receiving store and forward.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c789e9ce34b0a79169e2a58de77b0bee65490c56.png)

---

<div class="post-metadata">

**Author:** ![taguililla](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@taguililla](https://forum.inductiveautomation.com/u/taguililla)\
**Post date:** [March 27, 2025, 9:10am UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/22 "2025-03-27T09:10:49Z")

</div>

Hello, I so sorry, excuse me. I will delete it right now.

Best regards.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [June 15, 2025, 10:46pm UTC](https://forum.inductiveautomation.com/t/feature-allow-reference-tags-to-receive-backfill-data-from-sources-like-mqtt-tags/48261/23 "2025-06-15T22:46:09Z")

</div>

Hi Johnathan,  
I've been struggling to get the store-and-forward backfill into Reference tag to work without success.

I've carefully read the CirruLink guide and your instructions as well, but I still can't get it to work.  
I'm using 8.1.47 and 4.29 for the MQTT modules.

**My Main Ignition settings are:**

History enabled in Reference TAG and MQTT Tag with the same settings.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/1/a1c400cd359aaf332cb195b88adcdb15352b55dd.png)

Back-fill enabled in the Tag Provider with the Reference TAG.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/4/b477cfe538d88a0404a7247b6e3852b7d5beba29.png)

Write historical events directly to the historical provider DISABLED in the MQTT Engine  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/459b802e25517ecaf352d4e83b5f163cdd08379b.png)

**My EDGE settings are:**  
Transmitter History Settings

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fbfad84582798da4e9a5a76660e7dfdab950fac8.png)

With these settings, I get this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/4/9463f2571763fdd575169a3e0c1d738a0b588b49.png)

I can't recover history for the Reference Tag, but I can recover it for the MQTT Tag (except for about 10 seconds of data loss, which I assume is due to keep-alive and reconnection).

Can you please help me?  
Thanks

Regards, Andrés
