# (Reproducible) MQTT nodes show disconnected when server/message/topic contains an #

**URL:** <https://discourse.nodered.org/t/reproducible-mqtt-nodes-show-disconnected-when-server-message-topic-contains-an/61901>\
**Category:** General\
**Created:** [28 April 2022 01:03 UTC](https://discourse.nodered.org/t/reproducible-mqtt-nodes-show-disconnected-when-server-message-topic-contains-an/61901 "2022-04-28T01:03:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [28 April 2022 01:03 UTC](https://discourse.nodered.org/t/reproducible-mqtt-nodes-show-disconnected-when-server-message-topic-contains-an/61901/1 "2022-04-28T01:03:19Z")

</div>

If you edit an MQTT node (in or out) and in the `Server` section select the `Messages` tab and in `Messages sent on connection (birth message)` or `Message sent on an unexpected disconnection (will message)` put a `#` (pound sign) in the topic, when you deploy the node will only show `disconnected`.

This happens in NR v1.3.5 and NR 2.2.2

Interestingly it does not happen (that I have been able to cause) if you add it to the topic in `Message sent before disconnecting (close message)`

Moral: If your MQTT nodes show `disconnected` all the time, check those areas for a `#` in the topic.

Issue opened: [MQTT nodes show 'disconnected' if 'birth message' or 'will message' topic contains a '#' (pound sign) · Issue #3557 · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues/3557)

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [28 April 2022 03:37 UTC](https://discourse.nodered.org/t/reproducible-mqtt-nodes-show-disconnected-when-server-message-topic-contains-an/61901/2 "2022-04-28T03:37:36Z")

</div>

It's my understanding only the subscription can contain wildcards and you're publishing with both of those messages. Still, the input should be checked and disallowed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 June 2022 03:38 UTC](https://discourse.nodered.org/t/reproducible-mqtt-nodes-show-disconnected-when-server-message-topic-contains-an/61901/3 "2022-06-27T03:38:17Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
