Troubleshooting
Why a short MQTT outage resends 24 hours of history
Short answer
A sub-minute MQTT outage should replay at most a couple of minutes of records. When roughly a day of already-published history comes back, broker retransmission is not the cause: the rolling history buffer's read position has re-selected stored records. Trace the publisher's first batch by source timestamp and keep downstream deduplication in place.
On this page
A reconnect that resends roughly a day of already-published tag history after a disconnect well under a minute long is not broker retransmission and not the network. MQTT's delivery rules give the connection grounds to repeat only what was in flight when the link broke — a couple of minutes of records at these settings — so a replay measured in hours means the history publisher has re-selected stored records from its disk-backed store. The reported combination, Ignition 8.3.3 with MQTT Transmission 5.0.2 on a disk-based history store with the rolling buffer enabled, shows exactly that: after sub-minute outages, one device under an Edge Node republishes more than 24 hours of history with no warning logged, and the replay stops when the rolling buffer is deactivated. Confirm the replay span from source timestamps, then work it as a publisher read-position fault while keeping downstream deduplication in place.
The settings that shape a reconnect replay #
The four settings that decide what a reconnect is allowed to carry sit on the history store and its rolling buffer. In the reported setup they are:
| Setting | Reported value | What it controls |
|---|---|---|
| Keep Alive | 60 s | MQTT connection liveness — how fast a dead link is declared |
| Prune Interval | 120 s | How often the rolling-buffer prune pass runs |
| Rolling History Max Age | 120 s | How long a delivered record stays in the rolling window a reconnect may re-send |
| Rolling History Prune Quantity | 1000 | How many records one prune pass may process |
The rolling buffer and the disk store exist so a reconnect can backfill what could not be published while the link was down — the healthy behavior described in MQTT store and forward backfill after a connection outage. Nothing in these four values sets a replay span of hours: Rolling History Max Age bounds the re-sendable window, and the prune pass runs every 120 s with a budget of 1000 records, so a delivered record should leave that window within a couple of prune intervals. A record re-selected a day later is not following that schedule, whatever triggered it.
Example: how much history can a 55-second outage resend at Keep Alive 60 s? #
Inputs:
- Keep Alive: 60 s — the connection's liveness setting, from the reported configuration.
- Outage duration: 55 s — near the top of the reported range, typically under one minute.
- Detection factor: 1.5 — MQTT's keep-alive rule lets either side declare a silent link dead after 1.5 x Keep Alive without traffic.
Rule in words: on reconnect, the connection layer has grounds to repeat only messages it published but never saw acknowledged. Those unanswered publishes start no earlier than the break and end no later than when keep-alive declares the link dead, so the widest possible retransmission window is the detection delay plus the outage itself.
Arithmetic:
- Detection delay = 1.5 x 60 s = 90 s
- Worst-case window = 90 s + 55 s = 145 s (about 2.4 minutes)
- Observed replay span = 23 h = 23 x 3600 s = 82,800 s
- Ratio = 82,800 / 145 = 571
Result: a reconnect at these settings can legitimately re-send about 145 s of records; the reported replay carried about 82,800 s of source history, roughly 571 times the worst-case window.
Decision, scaled to any setup: window = (1.5 x Keep Alive) + outage duration. Up to about 145 s here is outage-window retransmission and needs nothing beyond ordinary duplicate handling. A replay measured in hours cannot be retransmission — it is the publisher re-reading stored records, and it calls for the trace below.
Retransmission and re-selection leave different fingerprints #
The connection layer and the history publisher leave separate evidence. Retransmission concerns messages that were in flight or awaiting acknowledgement when the connection broke; it repeats recent records and only those. Re-selection is the publisher assembling a batch from the disk store and presenting it as a fresh publication. The boundary shows in one comparison: the source event timestamps of the first post-reconnect batch against the ingestion timestamps in the downstream database. In the reported case the database received rows whose source stamps preceded the disconnect by about 23 hours while their ingestion stamps were post-reconnect, and the transmitter log showed one topic published with far more metrics than expected — the replay entered the data path upstream of database insertion, at the publisher.
No warning appears because nothing in that delivery path treats the batch as abnormal; the discrepancy only shows when source and ingestion stamps are compared. Duplicates are also the mirror image of the other silent effect of a short outage, the QoS 0 loss window in Sparkplug MQTT transmission, where the same event drops live records instead of replaying stored ones.
| What you observe | What it points to |
|---|---|
| Duplicates within the retransmission window (145 s here) | Outage-window retransmission; expected, handle downstream |
| Rows hours old by source stamp, ingested after reconnect | Publisher re-selection from the disk store; run the trace |
| One device replays, peers under the same Edge Node do not | That stream's publication state, not the connection |
| Every device under the node replays the same interval | Shared connection or Edge Node state |
| One topic published with far more metrics than expected, nothing logged | The oversized batch confirms the publisher chose the records |
Tracing the replay to the publisher's read position #
Work the trace per stream, because the fault moves between devices and connections and one affected stream's state is not representative:
- Record the last ingestion time into the downstream database before the disconnect and the first ingestion time after the reconnect.
- For the first large post-reconnect batch, capture the minimum and maximum source event timestamps; arrival time alone hides the replay.
- Group the duplicate rows by MQTT server connection, Edge Node, device and topic, and compare their source stamps against rows already stored before the outage.
- Confirm the pre-outage rows actually reached the historian before the disconnect, using the checks in when store-and-forward data counts as stored in the historian, so you compare delivered records with delivered records.
- Match the downstream duplicates to the transmitter's log entry for the oversized publication; topic, publication time and source-time range together tie the rows to the publisher rather than to ingestion logic reprocessing records.
- Containment check: deactivate the rolling buffer on one store and confirm the duplicates stop, then re-enable it, because the buffer is the data-loss protection for the next outage.
Database duplicates alone are weak evidence, because ingestion logic can also reprocess records; the log-to-row correlation in step 5 is what fixes the cause. Run any forced disconnect test in a maintenance window or on a stream you can reconcile afterwards, so the test does not write a day of duplicates into a production historian.
The decisions after the trace #
Three cases, each with its decision:
- Replay span within the ceiling from the example: retransmission, working as designed. Keep deduplication and change nothing.
- Replay of hours that stops when the rolling buffer is deactivated: the rolling-history path, not the broker. Keep the buffer enabled, because it is what prevents loss during the next outage, and keep deduplication keyed on source identity rather than arrival time. Raise a ticket with the module vendor's support desk with the trace evidence and the exact configuration values.
- Capacity guard while the full buffer span stays enabled: alarm when History Store Size crosses 75% of History Store Max Size, so a store that grows through repeated outages is caught before the disk fills.
Until the vendor documents a correction for this behavior, the stable posture is rolling buffer on, deduplication on, and the replay span checked per stream after every reconnect. Do not spend time on broker or session tuning as a fix: no session setting moves the ceiling, because the replay is not coming from the session.
Questions asked
How large should the rolling history buffer be relative to Keep Alive?
A workable floor is twice the Keep Alive interval: detection can lag the real break by up to about 1.5 times Keep Alive, so a window of at least twice Keep Alive covers the unacknowledged records without loss. At the reported Keep Alive of 60 seconds, that means at least 120 seconds of records in the rolling window. A far larger span adds nothing during an outage; it only enlarges what a faulty read position can re-select.
What should a support ticket for this replay include?
The Ignition and module versions, the four history-store settings exactly as configured, the broker address and port from the affected connection profile, gateway logs exported around the reconnect with the history publisher's loggers raised to debug level, and the first large batch's minimum and maximum source timestamps alongside the matching downstream rows. With that package the vendor's support desk can compare the publisher's read position against what was already delivered instead of inferring it from database duplicates alone.
Is this duplicate replay fixed in a newer MQTT Transmission build?
No published release note documents this replay as fixed in a named build, so treat it as unresolved for the reported combination of Ignition 8.3.3 with MQTT Transmission 5.0.2. Verify any version claim against the vendor's release notes for the exact module version before upgrading for this reason alone, and keep the containment and deduplication measures in place regardless of the version you run.
What should downstream deduplication key on for history records?
Key on the tag path together with the source event timestamp and the quality code, not on arrival or ingestion time. Re-ingested rows carry fresh ingestion stamps but old source stamps, so an arrival-time key misses them and a source-identity key collapses the replay onto the rows already stored. Keep that deduplication permanent while the rolling buffer is enabled: it is what turns this publisher fault into a harmless second copy instead of double-counted history.