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.