Edge Nodes Online Tag

Each edge node has a Node Info folder with an Online tag. How long does it take for that Online tag to go false when the edge node is not publishing any data?

Frequency of sending data doesn’t matter with Sparkplug. It’s really about the ‘session state’. Sparkplug sessions are bound by a NBIRTH and a NDEATH message over MQTT. There are a few things that could cause MQTT Engine to set an Edge Node to an offline state:

  • MQTT Engine receives an NDEATH from that Edge Node
  • MQTT Engine receives a message out of order from that Edge Node (suggesting the stateful session has been lost)
  • MQTT Engine itself goes offline

There are a number of caveats here that are addressed in the Sparkplug Specification itself as to how this works. We did a presentation via the Eclipse Foundation a while back that explains a lot of the details: Revolutionizing IIoT with Sparkplug and Eclipse Tahu - Virtual IoT - YouTube

How do you keep track of the time via tags of how long since you received data from that Edge Node?

This isn’t an exact way to do it - but there is an info tag in MQTT Engine for each Edge Node here:
[MQTT Engine]Edge Nodes/GROUP_ID/EDGE_NODE_ID/Node Info/Total Bytes Recvd

This will update at most every two seconds if data was received for that Edge Node within the previous two seconds. So, you can look at this tags timestamp and know within two seconds how recently data was received for it.