# MQTT Engine automatic tag generation not working as expected

**URL:** <https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583>\
**Category:** 3rd Party Modules\
**Tags:** ignition81\
**Created:** [May 15, 2022, 1:52pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583 "2022-05-15T13:52:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 1:52pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/1 "2022-05-15T13:52:51Z")

</div>

I’m using the latest version of Ignition and the Cirrus Link MQTT Engine to try to ingest data from an MQTT broker (normal MQTT topics with simple JSON payloads, not Sparkplug B) into Ignition tags.

I created a custom namespace in the MQTT Engine config, with a wildcard subscription. I expected that the MQTT Engine would parse any topics received and convert them to folders/tags, but it only converts one of them.

I can’t imagine that I’d need to create a separate custom namespace for each tag I want to ingest from MQTT - that’d be insane.

There are no entries in the log indicating and problems with parsing topic names. Also, I’ve verified with other MQTT client(s) and the same broker/wildcard subscription that messages are indeed being transmitted successfully. It seems to be a parsing issue with MQTT Engine, but again, no diagnostic information is available that I can see.

---

<div class="post-metadata">

**Author:** ![wes0johnson](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@wes0johnson](https://forum.inductiveautomation.com/u/wes0johnson)\
**Post date:** [May 15, 2022, 4:33pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/2 "2022-05-15T16:33:42Z")

</div>

Take a look at this and see if it helps: [https://docs.chariot.io/display/CLD80/MQTT+Engine+Custom+Namespace](https://docs.chariot.io/display/CLD80/MQTT+Engine+Custom+Namespace)

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 5:15pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/3 "2022-05-15T17:15:17Z")

</div>

Yup. Went through that in depth. Something seems to be failing in MQTT engine but no log messages or other indication why. Any way to turn on tracing or other diagnostics to see how it is processing topic messages?

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 15, 2022, 6:22pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/4 "2022-05-15T18:22:37Z")

</div>

I put together a little test bench to explore this. I was running into similar problems until I disabled the other namespaces for that MQTT connection. As a habit, I usually disable the built-in namespaces I never use. Then, you can filter out _Sparkplug B_ on a per-server basis if needed.

 ![Screen Shot 2022-05-15 at 1.14.47 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dc7a4f99629a8cc53353b91e088de65f78ff0f0c.png)  
 ![Screen Shot 2022-05-15 at 1.15.39 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/d/2d35138f8be48d0ae675ff1edf648e9e278ebe58.png)

That said, there might be a deeper issue here, but I figured I’d share this to hopefully get you up and running.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 15, 2022, 6:26pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/5 "2022-05-15T18:26:14Z")

</div>

Here is the little Docker Compose test bench I used, in the event further study is deemed of interest:

[https://www.icloud.com/iclouddrive/09fmJQqHwuttZMsVT0rAJOoqg#forum-59583](https://www.icloud.com/iclouddrive/09fmJQqHwuttZMsVT0rAJOoqg#forum-59583)

It was too big to share directly in the forum due to the included gwbk.

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 6:36pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/6 "2022-05-15T18:36:50Z")

</div>

Disabled all four of the other namespaces, and same behavior. It connects fine to my MQTT broker, but only creates a single tag based on incoming messages (even though it’s a wildcard subscription).

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 15, 2022, 7:04pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/7 "2022-05-15T19:04:19Z")

</div>

I tried re-enabling those namespaces, and sure enough I got back into the same state as you–only first JSON payload represented as tags. `c.c.m.e.g.j.JsonPayloadHandler` logger set to trace also not showing parsing for any other of the published topics (for new messages, not just the retained ones presented on initial connection). So it almost seems like the subscription isn’t setup right.

Also noticing a very long delay (almost a minute) in saving the changes to the namespace configuration through the GW web UI…

However, after disabling those namespaces again, everything seems to be coming through… Oddly enough, I was getting this error upon connection, prior (though not repeatedly when switching on/off Sparkplug B namespace):

```auto
forum-59583-gateway1-1 | jvm 1 | 2022/05/15 18:59:07 | E [c.c.c.m.c.CirrusClient] [18:59:07]: ME-57e34609-15ad-42c6: on connection to Mosquitto - Failed to subscribe on topic spBv1.0/# with QoS=0

```

When you reset the connection (going into the Server settings and just clicking _Save Changes_ should be enough to have it reconnect), do you see any errors in the logger related to failed subscriptions? I’ve connected to brokers in the past that seem to reject certain subscriptions and cause problems in initialization of MQTT Engine (thus my habits of being very explicit on enabled namespaces).

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 15, 2022, 7:14pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/8 "2022-05-15T19:14:45Z")

</div>

One other note that I can offer is that enabling DEBUG on `c.c.c.m.c.CirrusClient` logger will show you the subscriptions Engine is attempting to setup for each connection. Might help in troubleshooting.

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 8:54pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/9 "2022-05-15T20:54:08Z")

</div>

Thanks Kevin. Where can I make that logger configuration change?

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 8:57pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/10 "2022-05-15T20:57:45Z")

</div>

So I disabled the other namespaces, shutdown Ignition completely, restarted, and voila! It’s working as expected. Clearly there’s a bug in MQTT Engine related to having the other namespaces enabled. Honestly I think they should ALL be disabled by default.

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 9:17pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/11 "2022-05-15T21:17:30Z")

</div>

It’s still a bug I’d think - having those other namespaces enabled or disabled shouldn’t really affect the behavior of the custom namespace.

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 15, 2022, 9:36pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/12 "2022-05-15T21:36:22Z")

</div>

I spoke too soon - for a test I deleted the automatically created tags, and restarted Ignition, and the same error behavior returned (just creating a single tag).

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 15, 2022, 10:38pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/13 "2022-05-15T22:38:40Z")

</div>

> [@Rick\_Bullotta](#):
>
> Thanks Kevin. Where can I make that logger configuration change?

You can adjust the logger levels from _Status -\> Diagnostics -\> Logs_ section:

 ![Screen Shot 2022-05-15 at 5.29.33 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/8/784a268ff0d52e600317cd948cf81906c8690657.png)

For this situation it is probably sufficient to just adjust them after gateway startup. If you want to persist those log level changes, edit the `${IGNITION_INSTALL_LOCATION}/data/logback.xml` and add a `<logger>` element (details [here](https://logback.qos.ch/manual/configuration.html#loggerElement)):

 ![Screen Shot 2022-05-15 at 5.34.07 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0e1baec1f21c45c6fd5afe97e12c72818349ebbb.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 15, 2022, 10:39pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/14 "2022-05-15T22:39:44Z")

</div>

> [@Rick\_Bullotta](#):
>
> I spoke too soon - for a test I deleted the automatically created tags, and restarted Ignition, and the same error behavior returned (just creating a single tag).

For the benefit of further potential debugging, can you share the Ignition version you're using as well as the version of the MQTT Engine module you've installed?

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 16, 2022, 12:30pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/15 "2022-05-16T12:30:54Z")

</div>

Using 8.1.17 and downloaded the version of MQTT Engine compatible with 8.1.16 since it didn’t show up as compatible with 8.1.17.

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 16, 2022, 12:35pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/16 "2022-05-16T12:35:28Z")

</div>

With all of the other namespaces disabled (by explicitly disabling them) it started up fine this morning.

---

<div class="post-metadata">

**Author:** ![wes0johnson](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@wes0johnson](https://forum.inductiveautomation.com/u/wes0johnson)\
**Post date:** [May 17, 2022, 8:36pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/17 "2022-05-17T20:36:53Z")

</div>

Is it possible for you to supply the exact topics and payloads your testing with?

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 17, 2022, 9:20pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/18 "2022-05-17T21:20:31Z")

</div>

Hi, Wes.

I could do one better and put this on an open public MQTT broker if you’d like. Nothing secret in there.

Rick

---

<div class="post-metadata">

**Author:** ![wes0johnson](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@wes0johnson](https://forum.inductiveautomation.com/u/wes0johnson)\
**Post date:** [May 18, 2022, 4:09pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/19 "2022-05-18T16:09:43Z")

</div>

Sure - if you do that I can take a look.

---

<div class="post-metadata">

**Author:** ![Rick\_Bullotta](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rick\_Bullotta](https://forum.inductiveautomation.com/u/Rick_Bullotta)\
**Post date:** [May 18, 2022, 4:24pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583/20 "2022-05-18T16:24:41Z")

</div>

OK - they’re up there now at [broker.hivemq.com](http://broker.hivemq.com). Subscribe to TwinThread/# - all topics are retained so you’ll get a message for each.

[Next page](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583.md?page=2)
