test(mqtt): pin status-code half of republish suppression; note Sparkplug bypass

This commit is contained in:
Joseph Doherty
2026-08-16 04:16:35 -04:00
parent 39f67a0fce
commit 50035b36bb
2 changed files with 44 additions and 0 deletions
@@ -755,6 +755,10 @@ public sealed class MqttSubscriptionManager
// sink write) per message. The cache is still freshened — a read must serve the current
// timestamp — and only the notification is skipped. "Cached but not raised" is already a valid
// state on this path (see Raise: an authored-but-unsubscribed tag does exactly that).
//
// Sparkplug bypasses this entirely. SparkplugIngestor.cs updates Values and raises directly
// (its own Values.Update()/Raise() calls, not through this Deliver method), so Sparkplug B
// ingestion gets no unchanged-value suppression — deliberately out of scope here.
var prior = Values.Read(def.Name);
var unchanged = prior.StatusCode == snapshot.StatusCode && !ValuesAreDifferent(prior.Value, snapshot.Value);