From 3ffe45db53e2bddb176049c5384eeca1073c2e81 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 18 Jun 2026 04:20:34 -0400 Subject: [PATCH] feat(galaxy): wire SubscriptionRegistry handle resolver into the production writer --- src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs index f7a7efbd..c1ab307c 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs @@ -253,7 +253,11 @@ public sealed class GalaxyDriver _subscriber = new TracedGalaxySubscriber( new GatewayGalaxySubscriber(_ownedMxSession), _options.MxAccess.ClientName); _dataWriter = new TracedGalaxyDataWriter( - new GatewayGalaxyDataWriter(_ownedMxSession, _options.MxAccess.WriteUserId, _logger), + // Let the writer borrow live MXAccess item handles the subscription registry already + // holds, so the first write to an already-subscribed tag skips a redundant AddItem. + new GatewayGalaxyDataWriter( + _ownedMxSession, _options.MxAccess.WriteUserId, _logger, + _subscriptions.TryResolveItemHandle), _options.MxAccess.ClientName); _supervisor = new ReconnectSupervisor(