fix(drivers): R5 minors - MTConnect session publish+generation atomic and superseded pump joined; MQTT birth-typed writes use the birth's own datatype; AbLegacy dead init join removed + Dispose join test; docs (#602)
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
+18
-1
@@ -467,10 +467,27 @@ Both publish with `retain: false`. A **Plain** write goes at **QoS 1** (STAB-26)
|
||||
once the broker PUBACKs it, so `Good` means "the broker accepted it", and a broker refusal or a connection
|
||||
that died under the send is `Bad`. **Sparkplug commands stay at QoS 0** — a redelivered NCMD/DCMD would be
|
||||
re-applied. A Sparkplug metric the tag did not give a `dataType` is commanded with the type its live birth
|
||||
certificate declared (STAB-25), the same authored-beats-birth precedence reads use. Retain is the one that
|
||||
certificate declared (STAB-25), the same authored-beats-birth precedence reads use — using the birth's **own**
|
||||
Sparkplug datatype, not the lossy driver-type mapping, so Int8/UInt8/Text/Uuid/Bytes/File metrics are commanded
|
||||
with their real type; a birth type the encoder cannot represent (any `*Array`, DataSet, Template, …) is refused
|
||||
`BadNotSupported` rather than sent as another type. Retain is the one that
|
||||
matters and is deliberately not configurable: a retained command would be replayed by the broker to the device on *every* future
|
||||
subscribe — including the device's own reconnect — so one stale write would be re-applied forever.
|
||||
|
||||
**Plain QoS 1 is at-least-once.** Know the consequences before pointing a Plain `writeTopic` at a non-idempotent
|
||||
device topic:
|
||||
|
||||
- A lost PUBACK can make a device subscribed at QoS ≥ 1 with a persistent session receive the command **twice**
|
||||
(at QoS 0 delivery was downgraded and a duplicate could not happen).
|
||||
- A lost PUBACK, or the `ConnectTimeoutSeconds` (15 s) deadline, reports `Bad` and the node is **reverted**, even
|
||||
though the broker may already have delivered the write. `Good` is "the broker accepted it", `Bad` is "not
|
||||
confirmed", never "not delivered".
|
||||
- Each write holds `DriverInstanceActor`'s mailbox until the PUBACK arrives — up to 15 s per write, one after
|
||||
another; comparable to a Modbus round trip.
|
||||
- A broker advertising MQTT 5 Maximum QoS 0 will disconnect on every Plain write.
|
||||
|
||||
There is no per-tag QoS option; make the receiving topic idempotent (absolute setpoints, not increments).
|
||||
|
||||
### `writeTopic` is separate from `topic`, and its absence is meaningful
|
||||
|
||||
A tag commonly reads `…/state` and writes `…/set`, so the destination is its own authored field. A
|
||||
|
||||
Reference in New Issue
Block a user