Comparison
MQTT Recorder or Tag Historian for plant data
Short answer
Tag Historian stores timestamped values for individual tags in a SQL database, built for trends and time-based queries. MQTT Recorder receives a block of data from an MQTT server and inserts it as one row in a database table, built for completed field-generated records such as tickets and batch results. Choose by the unit of information, then put buffering where the link fails.
On this page
The difference is the unit of information, not the sampling rate and not the module count. The Tag Historian module turns a SQL database into a time-series historian: timestamped values, one stream per tag, queried for how a measurement changed. The MQTT Recorder module for Ignition does one different job: it receives a block of data from an MQTT server and enters that block as a single record in a database table, with the fields already assembled by the producer. If your data is a completed record generated in the field — a ticket, a batch result, a meter total — that association has to arrive intact, and no history setting can rebuild it from independent tag values. If your data is measurement over time, Tag Historian is the correct tool and a record path adds nothing. Many plants need both, and running both is normal.
Two data models can share one MQTT infrastructure #
Tag Historian stores what the tags do: its collection settings decide which observations land in the SQL database, and its query layer is built for time ranges and trends. MQTT Recorder stores what the field device says happened: the producer assembles a block of related fields, publishes it, and the module writes one row per block. The same broker and the same MQTT Engine subscriptions can feed both; what differs is the unit of information — the split mirrors the distinction the ISA-95 series draws between continuous process data and production transaction reporting.
| Decision point | Tag Historian | MQTT Recorder |
|---|---|---|
| Unit of information | One timestamped value for one tag | One completed record: a field set with one event identity |
| Who assembles it | The collecting gateway, from tag value changes | The producer, before publication |
| Time basis | Gateway collection time | Field event time, carried inside the payload |
| Question it answers | How did this measurement change over time? | Which fields belong to this ticket, batch or total? |
| Value that did not change | May be skipped, depending on deadband | Stored, because the record exists anyway |
| Effect of faster sampling | More observations retained | None on record boundaries |
| Where buffering belongs | Store-and-forward on the publishing gateway | Producer queue upstream of the failing link |
Everything else in the choice follows from this table rather than from capability lists.
Why history settings cannot manufacture a record #
Raising the sampling rate collects more observations. Tightening the deadband retains smaller changes. Neither establishes that several independently changing values belong to one completed event; the event boundary has to exist in the producer or the collection logic before the database sees anything.
Take two successive tickets that carry the same total. They are two records even though the value did not change, and a value-change history may hold only one observation of that value. One event can also fire several tag changes as the equipment updates its outputs, so counting changes does not count records.
Rebuilding a record from tag history is possible only with explicitly designed rules — clock alignment between sources, handling for fields that did not change, quality flags, a tested tie-break for the nearest sample. Where the record feeds custody transfer or regulated reporting, key the report on the field event timestamp and the producer's event identity rather than arrival time; that is the one rule that cannot be patched in after the schema exists.
Where buffering has to live #
Treat the delivery path as five failure boundaries: the producer's queue, the MQTT client, the MQTT server, the Recorder, and the database. The MQTT specification's QoS levels govern delivery between client and broker — QoS 1 is at-least-once, QoS 2 exactly-once for the message exchange — and every level stops at the broker. None commits a database transaction, and a committed insert says nothing about whether the producer has cleared its local queue. Sparkplug B standardizes how tag metrics and device state are represented over MQTT; it does not define your record's field set or event identity.
If the wide-area link fails before publication reaches the central system, a central writer cannot recover records that were never retained upstream, so the buffer belongs at the site. If the database fails after messages arrive centrally, retention and retry belong on the central gateway. The same boundary thinking drives choosing an edge data path for periodic records, and after an outage you will be running MQTT store and forward backfill after a connection outage on whichever segment held the data.
Worked example: rows per day and buffer size #
Illustrative inputs, not measurements from a specific site. A flow computer completes one record every 5 minutes and publishes it as one block; operations also wants 30 measurement tags trended, stored every 30 seconds.
Trend side: 1,440 min/day ÷ 0.5 min = 2,880 samples per tag per day, and 30 tags × 2,880 = 86,400 stored values per day in the historian.
Record side: 60 min ÷ 5 min = 12 records per hour, and 12 × 24 h = 288 rows per day in the record table, each row carrying the complete field set.
Edge buffer for a 48-hour WAN outage: 288 records/day × 2 days = 576 records retained; at an assumed 900 bytes each including queue overhead, 576 × 900 B = 518,400 B ≈ 506 KiB, and with a 2× margin about 1 MiB of persistent queue. Disk is not the constraint — reconciliation is: the producer's completed-event counter must equal the record table's row count for the same window, with any difference explained by the queue's statistics.
Fleet arithmetic favors central ingestion #
When many remote sites run Ignition Edge and the requirement is relational records in one database, two architectures exist. Convert every site to a standard gateway with SQL Bridge-style transactional writes: per-site licensing, per-site database connections, per-site failure modes to support. Or keep the sites on Edge publishing record blocks over MQTT and run MQTT Engine plus MQTT Recorder once, centrally: one database connection, one mapping to maintain, and nothing in the design changes as sites are added. For an illustrative fleet of sixty sites, that is sixty upgrade projects avoided against one central installation. The trade is real — buffering must then live at each site, sized as in the worked example. If the sites also need local trends while the link is down, where the Ignition Edge tag historian writes its data settles what remains queryable on site.
The decision #
Commit as follows:
- Trends, dashboards, time-based analysis, ad-hoc plotting of any tag over a shift: Tag Historian. A record module adds nothing here.
- Completed field-generated records — tickets, loadouts, batch results, meter totals, sequence-of-events blocks stamped at the equipment: the MQTT Recorder path. Do not rebuild these from tag history.
- Both questions asked of the same plant: run both; they share the MQTT infrastructure and never compete.
- Loss-intolerant records over an unreliable WAN: buffer at the producer, sized as record rate × outage hours × bytes per record plus margin, and verify by reconciling the producer's event counter against table rows.
- A growing fleet of Edge sites that must write relational data: ingest centrally with one MQTT Engine and MQTT Recorder installation instead of converting sites for transactional writes.
Questions asked
Does MQTT QoS 1 guarantee my records reach the database?
No. Under the MQTT specification, QoS 1 gives at-least-once delivery between the client and the broker, and it ends there. It says nothing about the Recorder's database transaction or how the producer clears its local queue. At-least-once also permits duplicates, so the ingestion path needs a dedupe key or an idempotent insert.
Can both modules run on the same Ignition gateway?
Yes. The data models do not conflict: Tag Historian keeps the trend history for the same measurements whose completed totals travel as record blocks, and both can share one MQTT infrastructure. Each module is licensed and configured separately, so treat this as a data-model split, not a platform choice.
How do I verify that no records were lost after an outage?
Compare the producer's completed-event counter against the row count in the record table for the same time window, then reconcile any difference against the buffering component's queue statistics. Run the check after every extended outage and periodically at steady state. An unexplained mismatch is a delivery fault in the path, not a sampling artifact.
What breaks if reports sort records by insertion time?
During an outage, records generated in the field arrive centrally in one later batch, so insertion order describes the communications recovery rather than the sequence of physical events. Store the producer's event timestamp as its own column and sort on it; keep the insertion timestamp separately for audit and troubleshooting.
Is a Sparkplug B payload enough to carry a record?
Not by itself. Sparkplug B standardizes how tag metrics and device state are represented over MQTT; a record is a different structure, a group of fields with one event identity and one field timestamp. If the producer publishes record blocks, follow the MQTT Recorder documentation for the message format and table mapping instead of assembling records from individual metric history.