Store and forward retains data during a communication outage and sends it after the connection returns. MQTT delivery options are part of the design, but they do not by themselves prove that a complete historical sequence reaches a database. Define persistence, capacity, replay ordering, and duplicate handling at the application boundaries.
Design the requirement before the configuration
Distinguish a broker session queue from an edge application’s durable local buffer. Specify what survives process restart and power loss, how full storage is handled, and whether new live data takes priority over replay. Assign each record a stable identity and retain its original timestamp. A downstream consumer should be able to detect gaps and apply an idempotent write policy where repeated delivery is possible. A retained MQTT message is a latest-value mechanism, not a history archive.
Worked scenario
Illustrative capacity calculation: 50 records per second at an average 200 encoded bytes per record require 36 MB per hour before storage and protocol overhead. An eight-hour outage therefore needs at least 288 MB for payload alone. Measure actual disk usage, index overhead, and replay throughput; include headroom and an explicit full-buffer policy.
What to verify
| Check | Evidence to record |
|---|---|
| Persistence | Test application restart and approved power-loss scenarios |
| Capacity | Measure stored bytes and define a full-buffer policy |
| Replay | Retain source time and expose replay progress |
| Consumer | Detect missing IDs and tolerate expected duplicate delivery |
Acceptance and handover
Disconnect the upstream path in a representative test, let the backlog grow, then restore it while new records continue arriving. Compare the sent and committed record identities. Measure catch-up time and confirm that operators can distinguish current readings from delayed history.
Continue the engineering work
Use the related technical library for deeper background, or follow an ASP project guide to plan the implementation sequence.
Primary references and further reading
Use the original specifications and product documentation for implementation details. The examples in this guide are illustrative engineering scenarios, not published project results.