{"id":"a479ff3b-da78-4314-920f-c4bec8fedd87","task":"Publish Sparkplug B NBIRTH and NDATA messages from an Edge Node with correct QoS levels","domain":"sparkplug","steps":["On connect, configure the MQTT Last Will and Testament as an NDEATH payload on the topic spBv1.0/GROUP_ID/NDEATH/EDGE_NODE_ID with QoS 1 and the retained flag set appropriately per the spec.","Immediately after a successful MQTT CONNECT, publish an NBIRTH message to spBv1.0/GROUP_ID/NBIRTH/EDGE_NODE_ID using QoS 0, containing all metric definitions with full metadata (name, alias, datatype, initial value) and a sequence number starting at 0.","For each connected device, publish a DBIRTH to spBv1.0/GROUP_ID/DBIRTH/EDGE_NODE_ID/DEVICE_ID at QoS 0 with that device's full metric catalog.","Publish operational telemetry as NDATA or DDATA messages at QoS 0, including only changed metrics plus the incremented sequence number (0-255, wrapping).","Use metric aliases (integer handles) in DATA messages instead of full string names to reduce payload size; aliases must be established in the BIRTH message.","The Primary Host Application publishes its STATE messages (online/offline) to spBv1.0/STATE/HOST_APP_ID at QoS 1 — this is the only message type requiring QoS 1 for a host."],"gotchas":["QoS 0 is mandated for ALL Edge Node and Device BIRTH, DEATH, and DATA messages; using QoS 1 for these violates the specification even though the broker may accept it.","QoS 1 is used ONLY for the Primary Host Application STATE message; confusing this with Edge Node messages is a common implementation error.","If the Edge Node reconnects, it must republish NBIRTH and all DBIRTH messages before publishing any DATA, because subscribers rely on the BIRTH to interpret metric aliases."],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/a479ff3b-da78-4314-920f-c4bec8fedd87"}