MQTT publishers
An MQTT publisher sends tag values to an MQTT broker (Mosquitto, HiveMQ, EMQX, Azure Event Grid and others) or to a cloud IoT service (AWS IoT Core, Azure IoT Hub, Google Cloud), so that dashboards, cloud platforms and other applications subscribed to the broker get them. To read values from a broker into tags, use the MQTT client connector instead (see Connectors).
You can run several publishers, for example one to the plant's own broker and one to a cloud broker. Each one is a
module on the Modules page with its own licence (licence type MqttPublisher; without one it runs as a 3-hour demo).
Add a publisher
- Open Services and choose MQTT in the list on the left. Each publisher is shown as a card with its state, its broker, how many tags it sends and how many messages are waiting.
- Press Add publisher, give it a name, choose where it connects under Connect to (below), pick the Tags to publish, and press Add publisher. It connects at once and sends every picked tag's value, then the changes. A notification at the bottom confirms it, and the page scrolls back up to the new publisher's card, which glows for a moment.
- Select a card to change a publisher. Save and apply reconnects it with the new settings. Delete publisher disconnects it and deletes the messages waiting for it.
The card and the publisher's first section show its state: Connected, Connecting…, or Not reachable with the reason (wrong address, refused sign-in, TLS problem) and how many messages are waiting on disk.
Connect to

| Choice | Use it for |
|---|---|
| MQTT broker | Any broker: Mosquitto, HiveMQ, EMQX, Azure Event Grid MQTT, a broker on AWS or Azure. Every setting is yours (below) |
| AWS IoT Core | An AWS IoT thing, signed in with its certificate |
| Azure IoT Hub | A device of an IoT hub, signed in with its key or an X.509 certificate |
| Google Cloud · ClearBlade IoT Core | A device of a ClearBlade IoT Core registry, the replacement for Google Cloud IoT Core (shut down in 2023) |
| Google Cloud · own broker | A broker you run on Google Cloud (EMQX, HiveMQ or Mosquitto on Compute Engine or GKE). Same settings as any broker |
For the cloud services, WiConnector sets host, port 8883, TLS and the client ID itself; you only give what identifies the device. They take QoS 0 or 1.
AWS IoT Core. In the AWS IoT console, create a thing, let it make a certificate, download the certificate and
private key, and attach a policy that allows iot:Connect (client ID = the thing name) and iot:Publish (and
iot:Subscribe / iot:Receive for writes) on your topics. In WiConnector enter the endpoint (Settings → Device
data endpoint, …-ats.iot.<region>.amazonaws.com), the thing name, and pick the certificate and key files. Topics,
retain, online status and writes work as with any broker. AWS allows at most 7 / in a topic, so keep deep tag paths
in mind when choosing the topic of each tag.
Azure IoT Hub. Add a device to the hub (IoT hub → Devices). Enter the hub name, the device ID, and either
its primary key (WiConnector makes the SAS token from it and reconnects with a new one before it ends; Token
valid for, default 24 hours) or an X.509 certificate and key. IoT Hub takes every message of a device on its
events topic devices/<device>/messages/events/, so each message is JSON with the tag path in it
({"path": "Plant/Line1/Speed", "value": 1200.5, "quality": "Good", "ts": "…"}, or a JSON batch); plain values,
retain and the status topic are not available (IoT Hub shows the connection state itself). The messages are marked as
UTF-8 JSON, so message routing queries can use the body. Read them with the hub's Event Hub-compatible endpoint,
routing, or az iot hub monitor-events.
Google Cloud · ClearBlade IoT Core. In ClearBlade IoT Core, create a registry and a device and register the
device's public key (RS256 or ES256). Enter the region's MQTT host (shown in the ClearBlade console, for example
us-central1-mqtt.clearblade.com), the project, region, registry and device IDs, and pick the
device's private key (PEM). WiConnector signs a JWT for each connection (Token valid for, default 60 minutes) and
reconnects with a new one before it ends. Like IoT Hub, messages go to the device's events topic
(/devices/<device>/events) as JSON with the tag path.
When a cloud sign-in is refused, the publisher's state shows the reason (for example not authorised: check the policy, the key or the certificate) and it keeps trying. Messages wait on disk meanwhile (store and forward).
Broker
For MQTT broker and Google Cloud · own broker: the same settings as a broker of the MQTT client connector: host and port (1883, or 8883 with TLS), MQTT version
3.1.1 or 5, client ID (empty gives wiconnector-publisher-<name>-broker; it must be unique on the broker), clean or
persistent session, anonymous or user and password (stored encrypted), keep alive, timeout, reconnect delay, and
TLS with an optional CA certificate, a client certificate and key (for brokers that sign clients in by
certificate, such as AWS IoT), and Verify or Accept any broker certificate.
Tags to publish
Tick groups and tags in the tree, or use Edit as patterns for wildcards and exclusions: Plant/** is everything
under Plant, !**/Setpoint leaves setpoints out. The section shows how many tags match. Tags added later that match
the patterns are published too.
Topics and payload
| Setting | Default | Meaning |
|---|---|---|
| Topic prefix | wiconnector | What {prefix} becomes, e.g. site1/wiconnector |
| Payload | JSON | JSON: one message per tag, {"value": 1200.5, "quality": "Good", "ts": "2026-11-28T10:00:00.000Z"}. Plain value: one message per tag with only the value (1200.5, true, Running). JSON batch: one message per publish interval with every changed tag: {"ts": "...", "values": [{"path": "Plant/Line1/Speed", "value": 1200.5, "quality": "Good", "ts": "..."}]} |
| Topic of each tag | {prefix}/{path} | Placeholders: {path} the tag path (Plant/Line1/Speed), {group} (Plant/Line1), {tag} (Speed), {connector}, {device} (empty for memory tags), {prefix}. Each / in a tag path is a topic level. + and # in tag names become _ |
| Batch topic | {prefix}/data | Topic of the JSON batch |
| QoS | 1 | 0 at most once, 1 at least once, 2 exactly once |
| Retain | Retained | The broker keeps each tag's last message, so a new subscriber gets the current values at once. Batches are never retained |
What is sent shows the topics of the first matching tags and an example payload, as you type.
Sparkplug B
Choose Payload → Sparkplug B to make the publisher a Sparkplug B edge node, for SCADA and host applications that speak Sparkplug (Ignition MQTT Engine, HiveMQ, Cirrus Link, Tahu-based hosts and others). It works with MQTT broker, Google Cloud · own broker and AWS IoT Core; Azure IoT Hub and ClearBlade have fixed topics and cannot carry Sparkplug. To read Sparkplug B from other edge nodes, use the MQTT client connector (see Sparkplug B (reading edge nodes) in Connectors).

| Setting | Default | Meaning |
|---|---|---|
| Group ID | WiConnector | spBv1.0/<group>/…, usually the site or area |
| Edge node ID | the publisher's name | Unique in the group |
| Devices | Per connector device | Per connector device: each connector device is a Sparkplug device (modbus1-plc1), memory tags are node metrics. First path level: Plant/Line1/Speed is metric Line1/Speed of device Plant. None: every tag is a node metric |
| Primary host ID | empty | When set (for example scada), the edge node waits for that host's STATE to be online before it sends its birth, and sends NDEATH and waits again when the host goes offline. Both spBv1.0/STATE/<host> (Sparkplug 3.0, JSON) and STATE/<host> (2.2, ONLINE/OFFLINE) are understood; a 3.0 STATE with an older timestamp than the last one is ignored |
What is sent, on spBv1.0/<group>/<type>/<edge node>[/<device>]:
- NBIRTH when it connects:
bdSeq,Node Control/Rebirthand the node metrics; then a DBIRTH per device. Each metric has its name, an alias, its data type (Boolean, Int16, UInt16, Int32, UInt32, Float, Double, String; scaled integer tags are Double) and its value. Metric names are tag paths, so hosts show them as folders. - NDATA / DDATA every publish interval with the changes, by alias. Values that are not Good carry the property
Quality(OPC codes: 64 Uncertain, 0 Bad, with no value); Good values have none. - NDEATH as the last will (with the session's
bdSeq), and when the publisher stops. - New births when tags are added, removed or changed, and when a host sends
Node Control/Rebirth.
Data messages are QoS 0 and never retained, as the specification asks, so the QoS, retain, topic and online status settings do not apply. With store and forward on, values made while the broker is down are sent after the next birth, marked historical. Writes from MQTT come as NCMD (node metrics) and DCMD (device metrics), by name or alias, and only for the picked Read and write tags.
When to send
| Setting | Default | Meaning |
|---|---|---|
| Publish interval | 1000 ms | Changes are collected this long and sent together; only the latest value of each tag |
| Send all again every | 0 (off) | Sends every tag again this often, changed or not. All values are always sent once when the publisher starts |
| Values that are not Good | Send them | Or skip them, so subscribers only see Good values |
Changes follow the tags' own deadbands (see Tags).
Online status
With Online status on (the default), the publisher publishes a retained online to {prefix}/status when it
connects, and registers offline as its last will: if WiConnector stops, crashes or loses the network, the broker
publishes offline itself. Stopping the publisher publishes offline too.
Store and forward
While the broker cannot be reached, messages wait on disk (data/mqtt/buffer/<publisher>), and are sent in the order
they were made when the broker is back, before any new value. They survive a restart of WiConnector. Buffer size
(default 100 MB) caps the disk used: when it is full, the oldest messages are dropped (counted as Dropped) so the
newest data is kept. With store and forward off, values made while the broker is down are not sent (they are
counted as dropped); set Send all again every so the current values reach the broker soon after it is back.
Writes from MQTT
Off by default. On Azure IoT Hub and ClearBlade IoT Core, writes come as cloud-to-device messages or commands to the
device with the body {"path": "Plant/Line1/Setpoint", "value": 75}, under the same rules as below.
When on, other MQTT clients can write tags by publishing to the write topic with the tag path at
the end: with the default {prefix}/write/{path}, publishing 75 (or {"value": 75}) to
wiconnector/write/Plant/Line1/Setpoint writes 75 to Plant/Line1/Setpoint. Only tags that match Tags MQTT clients
may write and are Read and write tags are written; other writes are refused and logged. Every write is in
Logs (Communication). Anyone who can publish on the broker can write these tags, so protect the broker with
users, ACLs and TLS.
Modules and licences
Each publisher is a row under System Configuration → Modules → Services, where it can be started, stopped,
restarted and terminated. A publisher stopped there stays stopped until it is started again, even if its settings
are saved. A licence for MqttPublisher sets how many publishers may run licensed; others run as demos.