Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MQTT Transmission provides a mechanism for publishing MQTT Messages from an Ignition script.  This can be useful for general messaging outside of Sparkplug.  For example, one may want to interface to another system that uses MQTT.  This method allows arbitrary MQTT messages to be published based on events that exist in Ignition.

Note
titleNote

MQTT Transmission must have a client connection to a broker/server to use the publish mechanism.  Be sure to Enable the RPC Client Connection in your Transmission Server configuration.  This is configured here under the Advanced Server Section in the:

Server Settings - RPC Client Connection


MQTT Message Publishing via Ignition Script:

...

Finally, save and publish the project.  At this point every time this tags value, quality, or timestamp changes it will result in a MQTT message being published on topic 'a/b/c' with a payload of 'hello world'.


Note

MQTT Transmision currently has a max inflight message limit of 10. Depending on the frequency of MQTT publishes and the QOS selected, you may see the error "Too many publishes in progress" in the Ignition logs.

There are a couple of options to work around this now:

  • Slow down the publish rate if possible
  • Use QoS0 for publishing
  • Set up multiple clients and spread the load across them

Additional Resources