Back to Articles
Data Ingestion & Integration

MQTT → PI via OMF: architecture, modelling and operational realities

MQTT is a common OT telemetry transport: lightweight, tolerant of intermittent networks and suited to event-driven publishing. For sustainable, large-scale delivery into PI, teams usually translate MQTT messages into...

7 min read82 views

MQTT → PI via OMF: architecture, modelling and operational realities

Meta description: Practical guide to MQTT → PI using OMF: workable architectures, modelling choices, Unified Namespace fit, PI Adapter for MQTT behaviour, and operational trade-offs.

MQTT is a common OT telemetry transport: lightweight, tolerant of intermittent networks and suited to event-driven publishing. For sustainable, large-scale delivery into PI, teams usually translate MQTT messages into OMF (OSIsoft Message Format) and use the PI ingestion stack built for that data shape. This article describes patterns that work in production, how modelling choices affect PI Server/AF over time, and the operational issues teams commonly encounter.

For broader context on ingestion options (interfaces, native connectors, adapters and MQTT) see: How Data Gets Into the PI System: Interfaces, Adapters, and MQTT

Core concepts: MQTT broker and publishers on the OT side; an ingestion component on the PI side that subscribes and writes. Sustainable designs add governance: consistent topics, stable identifiers and a canonical payload model.

OMF acts as an envelope and contract, separating data shape (types, containers, identifiers) from the live value stream. That separation supports long-lived models and incremental change without repeatedly reconfiguring the writer.

The PI Adapter for MQTT is the usual PI-side component. Operationally treat it as an ingestion service that (a) subscribes to topic filters, (b) maps payloads to OMF, and (c) forwards OMF to a PI endpoint that persists time series and optionally creates/maintains AF structure depending on governance choices.

For a refresher on PI deployment components and boundaries see: Designing a Scalable and Resilient PI System Architecture

Architecture patterns that work

Pattern A — Brokers → Adapter → PI

  • Devices/apps publish to the broker; the PI Adapter for MQTT subscribes, converts to OMF and writes to PI.
  • Benefits: isolation between publishers and PI concepts (tags, AF templates), simpler publisher requirements.
  • Risk: unstable payload schemas force constant model changes, replays and operational tickets. Keep the contract stable.

Pattern B — Local brokers + edge adapters, forwarding upstream

  • Useful where networks are segmented or links constrained. Local broker/adapter handle buffering and local validation; forwarding can be broker-bridge or OMF onward.
  • Benefits: reduced WAN dependency, simpler commissioning.
  • Trade-off: more distributed components to patch, monitor and standardise.

Pattern C — Unified Namespace (UNS) first, PI as consumer

  • Treat MQTT as the enterprise backbone for asset semantics; PI is one of many subscribers (analytics, historians, lakes).
  • Works well when naming, IDs, versioning and schema ownership are enforced.
  • Pitfall: having MQTT topics is not the same as a UNS. Inconsistent topic structures across lines quickly yield chaotic PI ingestion.

Data modelling with OMF — irreversible choices

OMF requires defining types and containers. That forces decisions on identity, cardinality and versioning.

Identity: what is the thing?

  • Avoid embedding identity only in tag names or volatile topics. Use stable asset identifiers (equipment ID, skid ID) and keep human-friendly names as metadata. Tying identity to organisational names (e.g. AreaA/Line1) makes reorganisations painful.

Cardinality: avoid a tag per variant

  • Devices and gateways evolve: new fields appear. If mapping auto-creates PI Points for every new key, you’ll create many low-value tags. Use typed OMF messages to constrain valid telemetry. If keys are highly dynamic, normalise upstream and publish a consistent set of measurements for history.

Units, scaling and quality

  • Decide early whether publishers send engineering units or whether edge applies scaling. Define how quality is represented. Mixed conventions (null, boolean flags, strings like “BAD”) require adapter exception logic; inconsistent contracts cost more effort than data collection.

AF structure: auto-create cautiously

  • Auto-creation can be useful, but without template governance AF becomes a mirror of uncontrolled payloads. Define element/attribute/PI Point rules and a template-versioning policy before enabling auto-create.

Topic design and UNS pragmatics

Topics should answer “what?”, “where?” and “what does it mean?” without embedding brittle business context. UNS-style conventions help if they are stable, documented and governed. Key question: who reviews topic and schema changes and manages deprecations? Without ownership the broker becomes a dumping ground and PI the complaint department.

If you’re early on the UNS path, start with a small, enforced contract for the measurements that matter and expand deliberately rather than imposing a grand taxonomy immediately.

Operational realities — what breaks in production

Reconnect storms and bursts

  • Client reconnections after network flaps can cause bursts, duplicates and out-of-order delivery. Depending on QoS, session state and buffering, PI can be hit with sudden write spikes. Design for bursts and ensure the ingestion path can absorb them without sustained lag.

Backfill and late data

  • Publishers that backfill on reconnection will send late data. PI stores late values, but you must decide how late is acceptable and how downstream calculations handle revisions. Late-arriving data can alter previously reported results; this is a governance decision, not an ingestion bug.

Tag explosions from schema drift

  • Uncontrolled schema drift plus auto-creation yields operational burden: larger backups, faster archive growth and uncertainty over which tags matter. Constrain auto-creation or enforce schema change processes.

Troubleshooting complexity

  • Brokers may aggregate many publishers and filters can overlap, so locating the root cause of a flat or missing signal is harder than with point-to-point interfaces. Consistent client IDs, topic naming and observability (logs, metrics) are essential.

For ingestion tuning and expected behaviour under sustained write load see: Keeping PI Fast, Stable, and Predictable at Scale

When to choose MQTT/OMF

Choose MQTT/OMF when you need a scalable, decoupled ingestion layer that lets many publishers feed PI without bespoke interfaces. It’s ideal for fleets or many similar assets where you can enforce a consistent contract.

Avoid or constrain MQTT/OMF when publishers send ad-hoc JSON blobs with rapidly changing keys or you cannot control publisher behaviour. In those cases normalise data before PI or limit ingestion to governable signals.

Also assess organisational readiness: a UNS-style approach requires ownership, review and lifecycle management. If that function does not exist, keep scope narrow and enforceable.

Trade-offs

MQTT/OMF gives decoupling and potential standardisation, but requires contract management and multi-party troubleshooting. You move from “configure an interface” to “operate a small integration platform.”

You gain flexibility but risk storing unused signals because publishing is easy. Latency versus reliability must be balanced: QoS, retained messages, persistent sessions and buffering improve robustness but can cause bursts, duplicates and late data. Define what “correct” means for your use case.

Common anti‑patterns

  • Broker as a free‑for‑all with no governance — leads to inconsistent semantics and an untrusted AF model.
  • Auto-creating tags and AF elements from uncontrolled payload keys — accelerates commissioning but creates long-term maintenance cost.
  • Embedding business hierarchy in topics/identifiers — renames imply new topics and break data continuity.

Operational checklist before go‑live

Ensure you can answer: “is data arriving?”, “is it correct?” and “can we recover?”. You must trace a measurement from publisher → broker → adapter → PI Point with timestamps and quality intact.

Establish identity and versioning rules: device IDs, measurement names, unit conventions and what constitutes a breaking change. Test failure modes: network loss, broker restart, adapter restart and PI connectivity loss, and observe queued messages and late data handling.

Getting specialist help

If you’re building an enterprise ingestion standard or aligning MQTT topics with AF and reporting, bring in practitioners who have operated this at scale. You can browse PI System integrators and consultants at: https://piadmin.com/directory

Further reading on PIAdmin.com

Share: