Subscribing to tag updates from a remote provider

We are using the subscribe method from TagSubscriptionManager to subscribe to all tag changes in a hierarchy. This works great on normal tag providers, but when we try to use it on a remote tag provider it fails silently (we just don’t get any triggers on the listener).

  1. Any ideas why this doesn’t work? It seems like the general concept of a remote tag subscription exists (i.e. you can create gateway tag change events for them). Is it based on the recursive/hierarchal nature of the request (i.e. the same reason you don’t see a count of tags for remote providers from the gateway console)?

  2. In a more general sense, any suggestions on the best way to subscribe to changes to all tags in a remote hierarchy?

Thanks!

Anyone have thoughts on this? We’re kind of blocked on a major project by this issue.

Hi,

First off, just to confirm, this is with the 7.9 sdk? And next, could you provide a few more details about how you’re subscribing? Are you actually creating a subscription for every single path under the hierarchy, or are you using a wildcard subscription? I’m not sure wildcard subscriptions are well documented, so you may not be aware that they’re a thing, but anyhow- let’s start with what’s going wrong, and then we’ll move to the “best” way to do it.

Hi Colby,

We’ve tried with v7.9.5 as well as v7.9.10 .

We’ve tried both ways

singleTag = TagPathParser.parse(providerName, tagName);
GatewayContext.getTagManager().subscribe(singleTag, listener);

wildcard = TagPathParser.parse(providerName, "*");
GatewayContext.getTagManager().subscribe(wildcard, listener);

The same code works for a local provider but not for a remote provider. We’re sure the remote provider is online by accessing the values through the Status pages.

Thanks.

I’ve retested. There’s still a problem, but the issue is with wildcard subscriptions.


Full tag paths works.

TIME LEVEL THREAD LOGGER MESSAGE
1553807679620 TRACE gn-site1-host:8060-recv-1 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager.ValueUpdates [site1-host] Received tag change events after 999 ms: [[DAIRY-SIM-PROVIDER-LOCAL]Overview/CaseCount.Value=[68.0, Good, Thu Mar 28 21:14:38 UTC 2019]]
1553807679620 TRACE gn-site1-host:8060-recv-1 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager [site1-host] Firing tag change event on ‘[DAIRY-SIM-PROVIDER-REMOTE]Overview/CaseCount’ : com.inductiveautomation.ignition.common.sqltags.model.event.TagChangeEvent@5095695d[tagPath=[DAIRY-SIM-PROVIDER-REMOTE]Overview/CaseCount,prop=Value,indexes=]
1553807679620 WARN gn-site1-host:8060-recv-1 MyTagSetListener changed: [DAIRY-SIM-PROVIDER-REMOTE]Overview/CaseCount

Wildcard paths will not trigger listeners

It never triggers my tag set listener and I’m not seeing the Firing tag change event on message. If wildcard isn’t supported for remote tag providers, why are the values still coming across the Gateway Network?

TIME LEVEL THREAD LOGGER MESSAGE
1553808642103 TRACE gateway-shared-exec-engine-4 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager Execute subscription validation. Path model sync’d=true, service available=true
1553808642113 TRACE gateway-shared-exec-engine-4 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager Subscription path set validated in 10 ms, result: OK
1553808642587 TRACE gn-site1-host:8060-recv-3 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager.ValueUpdates [site1-host] Received tag change events after 1 seconds: [[DAIRY-SIM-PROVIDER-LOCAL]Overview/Motor 1/Amps.Value=[14, Good, Thu Mar 28 21:30:41 UTC 2019], … 11 more]
1553808643588 TRACE gn-site1-host:8060-recv-4 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager.ValueUpdates [site1-host] Received tag change events after 1 seconds: [[DAIRY-SIM-PROVIDER-LOCAL]Overview/Sensor 2/Temperature.Value=[7.716341578294497, Good, Thu Mar 28 21:30:42 UTC 2019], … 7 more]
1553808644587 TRACE gn-site1-host:8060-recv-1 GatewayNetwork.Remote.TagProviderGW.SubscriptionManager.ValueUpdates [site1-host] Received tag change events after 998 ms: [[DAIRY-SIM-PROVIDER-LOCAL]Overview/Motor 1/Amps.Value=[18, Good, Thu Mar 28 21:30:43 UTC 2019], … 5 more]

Is more information needed to get reproduction steps for wildcard subscriptions of Remote Tag Providers?