IMD SolutionComputing LibraryShop main store

Comparison

Canary historian export paths: MQTT publisher or API read

Edge computing and IIoT Published 6 min read

Short answer

Canary gives you two confirmed ways to move historian data out: the Publisher service, which pushes real-time values to MQTT or Kafka as Sparkplug B or JSON, and the Read API, which an external client calls to pull stored data. An outbound OPC UA server is not a confirmed option.

On this page
  1. What paths move data out of a Canary historian?
  2. Is there an OPC UA server on Canary you can read from?
  3. Publisher or Read API: which fits a historian-to-historian feed?
  4. What does the Publisher service actually send?
  5. What does the Read API return?
  6. How much traffic does a publisher feed generate?
  7. Where should the Publisher service run?
  8. How do you prove the transfer worked?
  9. Questions asked

Canary gives you two confirmed ways out of the historian, and neither is an OPC server. The Publisher service pushes real-time data to third-party systems — Sparkplug B or JSON over MQTT, with Kafka also named in Canary's own material — and the Read API lets an external client pull stored data on request. This comparison sets the two paths side by side: what each carries, what traffic it generates, where the service belongs, and how to prove the data landed in the destination historian.

What paths move data out of a Canary historian? #

Two confirmed paths exist: the Publisher service pushes real-time data out to third-party systems, and the Read API lets an external client pull stored historian data; the data collectors you see in the tile list are ingress only. The collectors you already configured stay untouched in either case — they are acquisition, not distribution. The full field, including the ingress paths that get mistaken for exports:

Path Direction Documented basis Choose it when
Publisher — JSON over MQTT 3.1.1 Push, real time One of four methods on the version 24 Publisher tile The consumer parses generic JSON
Publisher — Sparkplug B over MQTT Push, real time Named in the Publisher documentation The consumer is Sparkplug-aware
Publisher — Kafka Push, real time Named in Canary training material The destination stack runs Kafka
Read API (web) Pull, stored data Requests route through the Views service; documented at readapi.canarylabs.com Backfill, migration, reporting
.NET API Pull, stored data Documented alongside the web API The client is a .NET application
Write API Push, into Canary Documented at writeapi.canarylabs.com Custom collection — ingress, not export
OPC UA server Pull, outbound Not confirmed in the reviewed documentation Do not design around it

Is there an OPC UA server on Canary you can read from? #

No outbound OPC or OPC UA server is confirmed in the Canary documentation reviewed here, so design the extraction on the Publisher or the Read API; if the interface must be OPC UA, get confirmation for your version before committing a schedule to it. The OPC-named pieces that are documented face inward: acquiring from an external OPC server into the historian is the pattern in connecting a Yokogawa ExaOPC server to Canary. If your integration standard mandates OPC UA, put the question to Canary support for your exact version and hold the design on the confirmed paths until the answer arrives.

Publisher or Read API: which fits a historian-to-historian feed? #

Use the Publisher when the destination must receive values as they change, and the Read API when it must receive history that already exists; most historian-to-historian integrations end up using both — one for the live stream, one for the backfill. Neither path is a finished connector. The push route needs something on the far end of the broker to write what arrives; the pull route needs a client the destination team builds or configures. Split the requirement before choosing: values flowing within seconds of a change are a Publisher job, while months of already-stored history moving across is an API job — the split used when backfilling PI from an existing plant historian. A common hybrid runs the Publisher for the live stream and API queries for the initial history load.

What does the Publisher service actually send? #

The version 24 Publisher tile documents four methods for sending real-time data to third-party systems; the reviewed pages name three of them — JSON payload over MQTT 3.1.1, Sparkplug B, and Kafka — so read your own version's tile before designing around the fourth. The Publisher connects to the Views service to read real-time data from the historian, so what goes on the wire is the live data path rather than a query result. Choose the payload by the consumer: Sparkplug B when the subscriber speaks it, because the specification exists to make MQTT clients from different vendors interoperate, and JSON when the consumer is a generic parser you control. The transport-level trade-offs mirror OPC UA versus MQTT Sparkplug from a controller to SCADA.

What does the Read API return? #

The Read API is a web API for reading stored data from the historian, with every request routed through the Canary Views subsystem service; its reference documentation lives at readapi.canarylabs.com, and a .NET API serves the same purpose. You request the tags and time windows you need, and your code maps the response into the destination historian's write interface. This is the route to script for migration windows and initial history loads, because you set the pace and the time slices rather than inheriting the plant's change rate.

How much traffic does a publisher feed generate? #

An illustrative feed of 850 tags averaging one change per tag every 30 seconds produces about 28 published values per second and roughly 79 kbit/s of JSON payload — trivial on a plant LAN and about 4 percent of a 2 Mbit/s cellular link. Illustrative numbers, not a Canary specification: replace the assumptions with your own.

  • Tags to publish: 850
  • Average change rate in production: one value per tag every 30 s
  • Assumed JSON envelope per published value: 350 B

Arithmetic:

  • 850 ÷ 30 s = 28.3 published values per second
  • 28.3 /s × 350 B = 9,905 B/s ≈ 9.9 kB/s
  • 9,905 B/s × 8 bit/B = 79,240 bit/s ≈ 79 kbit/s
  • Share of a 2 Mbit/s cellular link: 79,240 ÷ 2,000,000 = 4.0%
  • Per 12-hour shift: 28.3 /s × 43,200 s ≈ 1.22 million messages ≈ 428 MB

The decision from those inputs: at roughly 28 writes per second sustained, the network is not the constraint — the destination historian's ingest rate is, so size the receiving side for that. Sparkplug B's protobuf encoding packs each metric tighter than JSON text, and when the link itself is the scarce resource, the techniques in shrinking a Sparkplug JSON payload on a narrow link apply.

Where should the Publisher service run? #

Give the Publisher its own host when the feed runs continuously, because its load tracks tag count and change rate and you do not want it competing with the historian's own services for CPU and network. The machine-selection reasoning is collected in selecting a dedicated service host for the Publisher. When the answer is a dedicated box, a fanless mini PC is the class of machine that usually fills this role in a control cabinet.

How do you prove the transfer worked? #

Prove the path with one known tag: read its value and timestamp in Canary's own client, then confirm that same value and timestamp exists as a record in the destination historian before anyone calls the integration done. On the Publisher route, subscribe to the topic with a plain MQTT client, watch one tag's change arrive, then find that value and timestamp at the destination. On the API route, run one request and compare the returned value and timestamp against the destination write. Row counts will mislead you — they depend on write triggers and buffering — so compare a known value and timestamp, not totals.

When the broker sits across a network boundary, forwarding Canary historian data through a SaF proxy is the pattern covered separately. And hold one line throughout: this is an informational data path, and nothing published over it should gate a safety function.

Questions asked

Does the Publisher send data straight into the destination historian?

No. The Publisher's job ends when the message reaches the MQTT server or Kafka endpoint. Writing into the destination database is done by whatever consumes there — a connector the destination historian provides, or a small writer service you build and own.

Do the Canary data collectors send anything out?

No. Collectors are acquisition: they bring data into the historian from OPC servers, controllers, and other sources. Adding a Publisher or an API client changes nothing on the collection side, so an existing architecture stays intact while you add egress.

Can the Publisher and the Read API run at the same time?

Yes. They are independent services doing different jobs: one pushes current values as they change, the other answers client requests for stored data. Running both is normal — live streaming on the Publisher, targeted history pulls through the API.

Does the destination side need any Canary software?

Not on the MQTT route: any standards-compliant MQTT client can subscribe, and the documented transport is MQTT 3.1.1, so the broker must accept that protocol version. The web Read API is called over HTTP with no Canary install; the .NET alternative does use Canary's client libraries.

What happens to publishing when the broker is unreachable?

The reviewed documentation does not state QoS levels, buffering, or store-and-forward behavior for the Publisher, so treat those as open items with Canary for your version rather than assumptions. Plan the catch-up on the destination side — an API-driven backfill once the link returns is the dependable pattern.

Why pick Sparkplug B over plain JSON?

Sparkplug B defines the payload and the session rules, including birth and death certificates, so a subscriber that reconnects can tell whether its tag set is complete or partial. Plain JSON parses with generic tooling, but completeness and state handling become your consumer's problem.

Keep reading

  • Explainer

    Exporting Sparkplug B out of Geo SCADA to a historian

    No modified DDK driver will push Sparkplug B out of Geo SCADA, because the driver layer is pull-only in the outbound direction. Build the publisher on the Client API Sample DataFeeder pattern, which watches about 100,000 points per instance; for millions of points, use HSI or a database-level connector.

    Edge computing and IIoT

  • How-to

    Expose historian latest values over OPC UA or MQTT

    Yes — connect an integration gateway to the historian's classic I/O Server over SuiteLink (application name aahiosvrsvc, topic TagName) and publish the current values as OPC DA and MQTT. After a historian restart the I/O Server and the Live table return nothing until the source sends a new value, so a true last-known-from-disk read needs T-SQL or the historian SDK.

    Edge computing and IIoT

  • Comparison

    Getting Wonderware Historian data into Ignition Edge for MQTT

    Yes — Ignition Edge can publish this data as MQTT Sparkplug, but through two separate routes. Live values come from the existing DAServer acquisition layer behind a DA-to-UA gateway, because Edge's OPC client is UA-only. History and aggregates come from SQL queries against the Historian Runtime database, using its documented stored procedures.

    Edge computing and IIoT