Contents
Cirrus Link Resources
Cirrus Link Website
Contact Us (Sales/Support)
Forum
Cirrus Link Modules Docs for Ignition 7.9.x
Inductive Resources
Ignition User Manual
Knowledge Base Articles
Inductive University
Forum
The MQTT Sparkplug B specification defines a way for subscribing clients (like MQTT Engine) to notify publishing clients (like MQTT Transmission) when they are online or offline. The publishing clients can then key off of a particular subscriber’s status to do different things when the subscriber’s status changes either online or offline. One example would be that the disconnection of a main application such as a SCADA system could trigger the devices to stop transmitting any data as the main application is not available to receive the published data.
When the MQTT server determines an ungraceful disconnect between itself and the main application, it will publish a retained message to all connected clients stating that the main application is offline. When the Edge Node is notified that the main application has gone offline, the Edge Node will close its connection with the server and it will walk to the next one on the list. If the Edge Node is unable to make a connection to any server, it may have the ability to store that data locally in a buffer. That way, when it reconnects, the stored data can be delivered to its final destination.
The primary host ID is used for state notifications which are used to notify the Edge Node if the primary application goes offline.
If that primary host ID is not set, the Edge Node will not subscribe on these notification topics and will not receive any of these state notifications. In this case, data will only be buffered when it loses connection to the MQTT server not if the main application loses connection to the MQTT server.
Changes to the STATE message in the Sparkplug v3.0.0 Specification
For the MQTT Transmission (Edge Node) and MQTT Engine (main application) modules, the Primary Host ID is the setting used to identify the main application that is receiving the MQTT data to guarantee that we don't lose the data and ultimately deliver it to the application.
When configured, MQTT Engine will publish its connection state on a topic that contains the Primary Host ID.
In the event that MQTT Engine becomes disconnected from the MQTT Distributor or Chariot server, a death certificate will be published on the same topic setting the state to 'offline'. Any connecting client that subscribes on the state topic will then be notified of the MQTT Engine state.
When configured, MQTT Transmission will subscribe on 'state' notification topics. If MQTT Transmission is notified that MQTT Engine has gone 'offline', it will close its client connection with the MQTT server and begin to store messages locally (assuming Store and Forward is enabled) to be sent once MQTT Engine is back online.
When MQTT Transmission is notified that MQTT Engine is back 'online', it will publish all BIRTH messages along with the stored data.
If the Primary Host ID is not set: