Skip to content

[#547] Modified spec to better handle invalid PHID messages #548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ was connected to that MQTT Server and known by the Host Application MUST be upda
quality if the Host Application loses connection to the MQTT Server.*#

[tck-testable tck-id-message-flow-hid-sparkplug-state-message-delivered]#[yellow-background]*[tck-id-message-flow-hid-sparkplug-state-message-delivered] After
publishing its own Host Application STATE message, if at any point the Host Application is delivered
a STATE message on its own Host Application ID with a 'online' value of false, it MUST immediately
republish its STATE message to the same MQTT Server with a 'online' value of true and the
'timestamp' set to the same value that was used for the timestamp in its own prior MQTT CONNECT
packet Will Message payload.*#
publishing its own Host Application online STATE message, if at any point the Host Application is delivered
a STATE message on its own Host Application ID with a timestamp that is newer than the timestamp
that was used in its own immediately prior MQTT CONNECT packet Will Message, it MUST immediately
disconnect from the MQTT Server and reconnect. It MUST follow the standard rules for Host
Applications when establishing the connection to the MQTT Server.

[[operational_behavior_edge_node_session_establishment]]
=== Edge Node Session Establishment
Expand Down Expand Up @@ -634,8 +634,11 @@ plantuml::{assetsdir}assets/plantuml/primary-host-application-state-flow-diagram
. When an Edge Node is configured with multiple available MQTT Servers in the infrastructure it
should issue a subscription to the Primary Host Application STATE message. The Edge Nodes are free
to establish an MQTT Session to any of the available servers over any available network at any time
and examine the current STATE value. If the STATE message payload is online=false then the Edge Node
should disconnect and walk to the next available server.
and examine the current STATE value. If the STATE message payload is online=false and the timestamp
in the payload is older than the previous timestamp received for this Host Application, then the
Edge Node must disconnect and walk to the next available server. If the Edge Node had never
received a previous STATE message for this Host Application, it must honor the online flag and store
the timestamp for future comparisons.

. Upon startup, the configured Primary Host Application's MQTT Client MUST include the Primary Host
Application DEATH Certificate that indicates STATE is online=false with the message RETAIN flag set
Expand All @@ -647,7 +650,10 @@ number and represent the number of UTC nanoseconds since Epoch.
. As the Edge Node walks its available MQTT Server list, it will establish an MQTT Session with a
server that has a STATE message with a JSON payload that has online=true. The Edge Node can stay
connected to this server if its MQTT Session stays intact and it does not receive the Primary Host
Application DEATH Certificate.
Application DEATH Certificate. The Edge Node MUST only honor STATE messages if the incoming
timestamp is newer than or equal to the previous timestamp for this Host Application. If the Edge
Node has not seen a STATE message within its current MQTT Session, it also MUST honor the STATE
message.

. Having a subscription registered to the MQTT Server on the STATE topic will result in any change
to the current Primary Host Application STATE being received immediately. In this case, a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ whether or not the Sparkplug Host Application is online and operational or not.
* [tck-testable tck-id-payloads-state-will-message]#[yellow-background]*[tck-id-payloads-state-will-message] Sparkplug
Host Applications MUST register a Will Message in the MQTT CONNECT packet on the topic
'spBv1.0/STATE/[sparkplug_host_id]'.*#
** The [sparkplug_host_id] should be replaced with the Sparkplug Host Application's ID. This can be any
** The [sparkplug_host_id] must be replaced with the Sparkplug Host Application's ID. This can be any
UTF-8 string.
* [tck-testable tck-id-payloads-state-will-message-qos]#[yellow-background]*[tck-id-payloads-state-will-message-qos] The
Sparkplug Host Application MUST set the the MQTT Will QoS to 1 in the MQTT CONNECT packet.*#
Expand Down
Loading