Data service

Store UNS measurements in QuestDB

UNS Archiver is a Runtime add-on that subscribes to eligible UNS data and table topics and persists received measurements in QuestDB. It publishes topic-to-table mappings and operational health for other services to use.

From UNS topic to queryable history

A producer publishes timestamped UNS measurements over MQTT. Archiver follows topics that are active and eligible, stores received data and table packets in QuestDB, and publishes mappings that help consumers resolve UNS topics to their storage tables. UNS API Global can then provide current and historical queries through its own API contract.

Ingestion modes and current boundaries

AppendAdd received records

Persist incoming measurements as records, including absolute counter states and their source timestamps.

DedupAvoid duplicate records

Use the configured deduplication behavior when repeated data is received.

Window replaceBasic time-window replacement

The current mode can soft-delete records treated as missing from a replacement window; it is not yet a complete confirmed-import reconciliation protocol.

Buffer, retry, and inspect service health

Archiver uses a bounded live queue and a disk-backed buffer to retry transient QuestDB write failures. It reports dependency state and ingestion backlog through its service-health metadata, and publishes mappings used by other services.

The Controller-facing authenticated operations include status inspection, pause and resume, and topic review. Eligibility is governed separately: active-topic state determines whether a topic is included for history, so the buffer should not be understood as an unconditional archive of every MQTT message.

Keep ingestion separate from interpretation

The Controller and Schema define active-topic eligibility and the expected data context. Archiver persists eligible source records; it does not fill missing intervals, interpolate values, or calculate derived measurements. Use an API or query layer when those transformations are explicitly needed, while keeping the archived source measurements intact.

Planned improvements

The following items are planned work, not claims about the current release. No release date is implied.

  • Confirm complete importsDefine record identity and source confirmation for complete time windows, including empty windows, retries, and corrections.
  • Reconcile overlapping windows safelyUpsert received records and mark missing records only after a complete import is confirmed, scoped to the exact UNS identity so other attributes in a shared table are unaffected.
  • Preserve source qualityStore an optional measurement-quality value and source status code; leave quality unknown when the source does not provide it.
  • Record first receipt timeOptionally record when Archiver first received a packet, separately from its source timestamp.