Versions Compared

Key

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

When MQTT Transmission Store and Forward is enabled and the edge node detects a disconnect to with the MQTT Server, tags will be stored locally in a history store. 

If your system is fully Sparkplug B compliant, you can also use Store and Forward to ensure that data is buffered locally in the event the main application is offline but the client side is still connected to the server. The MQTT Sparkplug B specification defines a way for subscribing clients (such as MQTT Engine) to notify publishing clients (such as MQTT Transmission) via a STATE message when they are ONLINE or OFFLINE. The publishing clients can then key off a particular subscribing clients status to do different things when that subscriber status changes either to offline or online. MQTT Transmission uses this functionality to enable the store and forward of tag changes within the module. 

How quickly the edge node detects the disconnect these conditions and starts to store the data will minimize the data loss when using MQTT Store and Forward

...

and there are a couple of configuration parameters within MQTT Transmission to assist with this: Keep Alive and Primary Host ID.

Keep Alive

The MQTT protocol is hosted on top of the TCP protocol, which is connection-oriented, and provides a stable and orderly flow of bytes between two connected parties. Normally when the MQTT Transmission client attempts to send data over TCP, it will receive an error at the TCP level if disconnected and can immediately start to buffer data locally.

...

Warning

Setting the Keep Alive to a short interval will increase the data traffic over the TCP connection in the event that the client is idle.

Setting the Keep Alive to 0 will disable the Keep Alive functionality

If your system is fully Sparkplug B compliant, you can also use Store and Forward to ensure that data is buffered locally in the event the main application is offline but the client side is still connected to the server. The MQTT Sparkplug B specification defines a way for subscribing clients (such as MQTT Engine) to notify publishing clients (such as MQTT Transmission) via a STATE message when they are ONLINE or OFFLINE. The publishing clients can then key off a particular subscribing clients status to do different things when that subscriber status changes either to offline or online.

MQTT Transmission uses this functionality to enable the store and forward of tag changes within the module. 


...

Primary Host ID

When Primary Host ID is configured, MQTT Transmission will subscribe on STATE notification topics. If MQTT Transmission is notified that the primary backend application, configured in the Primary Host ID, has gone is 'OFFLINE', it will close it's client connection with the MQTT server and walk to the next MQTT server defined in the set. Data will be stored locally until the state of the primary host is "ONLINE" when any stored data will be published.

...