Explainer
Selecting an MQTT client library for Automation Studio 6
Short answer
For Automation Studio 6, use the community IotMqtt build 1.3.8-AS6-rev01 published under V6.0.2 rather than rebuilding the older binary package, whose published targets stop at 4.x runtime families. Match PvJson with the documented 6.0-series rule, and test the reported PvName root-member limitation topic by topic before production use.

On this page
On Automation Studio 6, use the AS6-specific IotMqtt build published in the community paho.mqtt.c-ar repository and drop any plan to rebuild the older package yourself. The repository lists build 1.3.8-AS6-rev01 under runtime target V6.0.2, while the previously published libraries are compiled binaries whose listed runtime builds stop in the 4.x families, so there is nothing in them to recompile for the AS6 compiler. Match the PvJson dependency against the documented version rule, then qualify the pair in your own project with a publish-and-subscribe test on the real controller, because community repositories carry no official product support status. One reported limitation still needs its own test before you rely on parallel subscriptions: the PvName registration is matched against the JSON root member, which may stop two topics that share one root from routing separately.
The build that fits an Automation Studio 6 project #
The client lives in the br-automation-community/paho.mqtt.c-ar repository: compiled MQTT client libraries for Automation Runtime, based on the Eclipse paho.mqtt.c library and OpenSSL. The path to import in an AS6 project is IotMqtt/1.3.8-AS6-rev01/IotMqtt/V6.0.2, which names the library, the AS6 build revision and the runtime target in one string.
The older published set lists runtime builds A4.73, C4.63, D4.53, N4.34 and M4.26, on Intel and ARM targets. None of those is a 6.0-series runtime, so an AS6 project has exactly one candidate in the repository. Import that one; do not import an older binary and expect the project to build.
Why the old package cannot be rebuilt for AS6 #
The libraries were published in binary form, with no editable source behind them, and producing the AS6 build required reworking several repositories that feed IotMqtt for the new compiler. The published result of that work is the AS6 build listed above, which is why the decision today is to import it rather than attempt a local port of the old binaries.
Support status matters as much as the build. Projects in the vendor's community repositories are shared samples without official product support, even when vendor employees created them. A migration schedule cannot rest on an assumed future update, product-level support questions belong in the official support channels rather than a repository issue list, and the fork-and-adapt path applies to source you can edit — with binary artifacts there is nothing to adapt.
Qualifying IotMqtt 1.3.8-AS6-rev01 under V6.0.2 with PvJson 6.0.7001 #
The inputs, and where each comes from:
- Runtime on the target controller: V6.0.2 — the project's Automation Runtime version and the target named in the repository path.
- IotMqtt build: 1.3.8-AS6-rev01 — the AS6 revision the repository publishes.
- PvJson revision available to the project: 6.0.7001 — the only revision one project could locate when it added the dependency.
- PvJson selection rule, documented in the
PvJsonrepository: when Automation Runtime is 6.0 or newer, use a6.0.xxxrevision; the documentation also maps older runtime ranges.
The rule in words: read the major and minor fields of the runtime version, find the PvJson family whose major and minor fields match, and take a revision inside that family.
The arithmetic: V6.0.2 has major field 6 and minor field 0. The documented branch for this case opens at 6.0, and 6 = 6 with 0 = 0, so the project falls in the 6.0.xxx family. The available revision 6.0.7001 carries major 6 and minor 0, so it sits inside that family; the third field, 7001, only selects the build within it. That revision therefore satisfies the documented rule for this runtime.
The result: import the AS6 IotMqtt build together with PvJson 6.0.7001 and build the project under Automation Studio 6. A clean compile is evidence that the dependency set resolves; it is not yet evidence that the client works.
The decision: record the revisions the project references before importing anything, then run a controlled publish-and-subscribe test on the target controller — publish a known value to a known topic and confirm the intended process variable updates with it. Production duty starts only after that test passes, and this client stays on monitoring and job data; a safety function remains on its certified channel regardless of how well the test goes. The burden of proof sits with your own tests on the target, the same discipline you would apply to qualify a locally manufactured PLC for industry.
If the build fails, keep the complete error text, the library names and the selected revisions, because an unreadable screenshot cannot be diagnosed. Re-check a PvJson revision mismatch against the repository's rule before changing anything else, and if the failure is an fd_mask error during the build, the documented fix is in Fixing the fd_mask error when building an MQTT library.
The PvName root member and parallel subscriptions #
IotMQttRegParSub.PvName is registered with the address of a string whose content is the name of the JSON root member that carries the payload:
pvname := 'Datasource';
IotMQttRegParSub.PvName := ADR(pvname);
A payload registered that way has the root member as its outermost object:
{
"Datasource": {
"Topic": "testTopic/job_status",
"Timestamp": "1691477115130",
"Job": {
"JobName": "Job in production",
"JobId": "AB123456"
}
}
}
The reported limitation: a second payload from the same source reused the Datasource root with a different Topic field, testTopic/job_information_next, and different Job fields, and the two subscriptions were inferred not to stay separate, because each registration is keyed to one root member name. That inference is a hypothesis. Nothing documents whether the restriction is inherent, configuration-dependent, or already different in the AS6 build.
Test it before relying on parallel subscriptions. Register one topic and confirm its process variables update. Register the second with the same root and check whether both still route to their own variables. If the combined test collides, the design that satisfies the constraint is one distinct root member per source at the publisher, so every registration owns its own root. Design the payload roots that way and the question never arises; until a two-topic comparison reproduces the collision, treat the limitation as unconfirmed.
What to decide in each situation #
- New Automation Studio 6 project that needs MQTT: import the AS6 build with the matching 6.0-family PvJson revision and qualify it with the publish-and-subscribe test above. With an AS6 build listed in the repository, this library is no longer a reason to keep a project off AS6.
- Project still running a 4.x runtime: the older published binaries match those runtime families as built. A later move to AS6 means switching to the AS6 build and requalifying from scratch, not editing the old package.
- Production already depends on this client: keep the qualification evidence with the project version, rerun the publish-and-subscribe test after any repository update, and treat support as your own responsibility, with the vendor's official channels for product-level questions.
Questions asked
Which IotMqtt build runs on Automation Studio 6?
The community repository lists build 1.3.8-AS6-rev01 of the IotMqtt library, published under target V6.0.2. It is a shared sample without official product support status, so qualify it on your own controller: build the project, publish to a known broker topic, and confirm the intended process variable updates before the client carries production traffic.
Can the older paho.mqtt.c-ar libraries be rebuilt for Automation Studio 6?
No. They were published as compiled binaries based on OpenSSL and the Eclipse paho.mqtt.c library, and their listed runtime builds are the 4.x families, such as A4.73 and M4.26 on Intel and ARM. There is no editable source in the package, so a local rebuild for the AS6 compiler is not possible; import the AS6-listed build instead.
Which PvJson revision does IotMqtt need on Automation Runtime 6?
The PvJson repository documents that Automation Runtime 6.0 or newer takes a revision in the 6.0 family. A project that only finds 6.0.7001 satisfies that rule, since its major and minor fields match the runtime. Check the revision already referenced in your project against that rule before importing, and re-check it first if the compiler reports a dependency mismatch.
Does IotMQttRegParSub.PvName block two subscriptions on one JSON root?
It was reported as a possible limitation, not documented behavior. Each registration takes the name of one root member, and the reported case found two payloads sharing the root member Datasource while coming from different topics. Nothing confirms whether that is inherent or already changed in the AS6 build, so run the two-topic test: one subscription alone, then both together, comparing whether each routes to its own variables.

