# Subscribing to tag updates from a remote provider

**URL:** <https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614>\
**Category:** Module Development\
**Tags:** ignition79\
**Created:** [March 26, 2019, 6:32pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614 "2019-03-26T18:32:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan.t.king](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@ryan.t.king](https://forum.inductiveautomation.com/u/ryan.t.king)\
**Post date:** [March 26, 2019, 6:32pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614/1 "2019-03-26T18:32:08Z")

</div>

We are using the [subscribe](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/common/sqltags/model/TagSubscriptionManager.html#subscribe-java.util.List-java.util.List-) 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!

---

<div class="post-metadata">

**Author:** ![ryan.t.king](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@ryan.t.king](https://forum.inductiveautomation.com/u/ryan.t.king)\
**Post date:** [March 28, 2019, 6:06pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614/2 "2019-03-28T18:06:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [March 28, 2019, 6:11pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614/3 "2019-03-28T18:11:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rothwell](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rothwell](https://forum.inductiveautomation.com/u/rothwell)\
**Post date:** [March 28, 2019, 7:57pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614/4 "2019-03-28T19:57:03Z")

</div>

Hi Colby,

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

We’ve tried both ways

```auto
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.

---

<div class="post-metadata">

**Author:** ![rothwell](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rothwell](https://forum.inductiveautomation.com/u/rothwell)\
**Post date:** [March 28, 2019, 9:41pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614/5 "2019-03-28T21:41:00Z")

</div>

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] |

---

<div class="post-metadata">

**Author:** ![rothwell](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rothwell](https://forum.inductiveautomation.com/u/rothwell)\
**Post date:** [March 29, 2019, 5:05pm UTC](https://forum.inductiveautomation.com/t/subscribing-to-tag-updates-from-a-remote-provider/23614/6 "2019-03-29T17:05:54Z")

</div>

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