I’m working on an integration that’s using MQTT to communicate between Ignition and another application. I am using the Engine Module and the Transmission module. A question that has come up recently is what version of MQTT Ignition supports. I had thought that was more of a broker question (we are using Mosquitto), but I was wondering if Ignition supports a specific version of the MQTT protocol for the Engine Module. I tried Googling a few things but have come up empty. Any help here would be appreciated.
The MQTT Modules for Ignition are all Sparkplug compatible. Sparkplug will work with both MQTT 3.1.1 and MQTT 5.0. We’re in the process of calling out the specific portions of the MQTT protocol that are required via the Sparkplug Working Group. This is because Sparkplug doesn’t use things like persistent sessions or QoS2.
I should note that many cloud based MQTT Servers such as AWS IoT Core and Azure IoT Hubs are not compliant with the MQTT specification and will not work with the MQTT Modules for Ignition. Some MQTT Servers I know will work include MQTT Distributor for Ignition, Cirrus Link’s Chariot MQTT Server, and HiveMQ.
@wes0johnson thank you for the clarification. The application we are connecting to is not Sparkplug B compliant so we will be integrating using the MQTT Engine module and monitoring folders based on tag change events to bring values into Ignition’s Tag Providers. Is Engine also MQTT 5.0 compatible?
We haven’t actually tested it against 5.0 only MQTT Servers but it should just work. I assume you’re planning to use custom namespaces in MQTT Engine, correct? I should note MQTT Engine won’t take advantage of any 5.0 features. But, I don’t think you’ll run into issues with custom namespaces.
This is great info, thank you for the help @wes0johnson !
I should note that many cloud based MQTT Servers such as AWS IoT Core and Azure IoT Hubs are not compliant with the MQTT specification and will not work with the MQTT Modules for Ignition.
I’m curious of how you found this out. I’m reading here that "For devices and clients that use MQTT, MQTT over WSS, and HTTP protocols, AWS IoT Core Message Broker provides a high-throughput publish/subscribe message broker to transmit messages to and from all of your IoT devices and applications. "
So is it because AWS IoT Core is not Sparkplug compatible?
See the bottom of this page:
In the current version of the Sparkplug Spec we stated that a 3.1.1 compliant broker is required. Sparkplug doesn’t require all aspects of the MQTT specification. But, it requires many of them.The big ones that IoT Core doesn’t support are retained messages or the requirements of MQTT with regard to message ordering. There are ways that Sparkplug clients can be hacked to partially work with AWS IoT Core. But, some things like Primary Host can not be supported with IoT Core because it is not compliant with the MQTT specification.
I should note the next version of the Sparkplug specification will be more clearly stating the individual specific portions of the MQTT specification that are required.