# Custom Namespaces

**URL:** <https://forum.cirrus-link.com/t/custom-namespaces/206>\
**Category:** MQTT Modules\
**Tags:** mqtt-engine\
**Created:** [April 25, 2022, 10:27am UTC](https://forum.cirrus-link.com/t/custom-namespaces/206 "2022-04-25T10:27:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasperlg](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jasperlg](https://forum.cirrus-link.com/u/jasperlg)\
**Post date:** [April 25, 2022, 10:27am UTC](https://forum.cirrus-link.com/t/custom-namespaces/206/1 "2022-04-25T10:27:58Z")

</div>

As soon as we add a custom namespace, all of our values go to ‘bad\_stale’ in MQTT Engine.  
It doesn’t matter what we add in the custom namespace, it just goes bad immediately.

What could be causing this?

---

<div class="post-metadata">

**Author:** ![wes.johnson](https://avatars.discourse-cdn.com/v4/letter/w/f14d63/32.png) [@wes.johnson](https://forum.cirrus-link.com/u/wes.johnson)\
**Post date:** [April 25, 2022, 2:56pm UTC](https://forum.cirrus-link.com/t/custom-namespaces/206/2 "2022-04-25T14:56:26Z")

</div>

For the tags that are going stale - are they coming in via Sparkplug B (i.e. MQTT Transmission)? When you create a Custom Namespace, MQTT Engine restarts. This in turn causes all Sparkplug tags in MQTT Engine to go stale. Using ‘Primary Host ID’ in Engine and the associated Transmission Server sets will prevent this by forcing them to send new BIRTH messages.

---

<div class="post-metadata">

**Author:** ![jasperlg](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jasperlg](https://forum.cirrus-link.com/u/jasperlg)\
**Post date:** [April 27, 2022, 9:40am UTC](https://forum.cirrus-link.com/t/custom-namespaces/206/3 "2022-04-27T09:40:14Z")

</div>

Hi Wes,

We managed to workaround this by reinitializing the MQTT Transmission after we add a namespace.  
We kept on having bad\_stale, even when we use Primary Host ID.

---

<div class="post-metadata">

**Author:** ![wes.johnson](https://avatars.discourse-cdn.com/v4/letter/w/f14d63/32.png) [@wes.johnson](https://forum.cirrus-link.com/u/wes.johnson)\
**Post date:** [May 4, 2022, 11:56pm UTC](https://forum.cirrus-link.com/t/custom-namespaces/206/4 "2022-05-04T23:56:13Z")

</div>

This shouldn’t be happening - do you have primary host ID set on both the Engine and Transmission sides?

---

<div class="post-metadata">

**Author:** ![jasperlg](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jasperlg](https://forum.cirrus-link.com/u/jasperlg)\
**Post date:** [May 5, 2022, 7:38am UTC](https://forum.cirrus-link.com/t/custom-namespaces/206/5 "2022-05-05T07:38:38Z")

</div>

Yes we have. If one of you would like to take a look, I have the issue quite isolated.
