# MQTT node name formatting

**URL:** <https://discourse.nodered.org/t/mqtt-node-name-formatting/59391>\
**Category:** General\
**Tags:** mqtt\
**Created:** [5 March 2022 01:23 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391 "2022-03-05T01:23:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sneakynuts](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@sneakynuts](https://discourse.nodered.org/u/sneakynuts)\
**Post date:** [5 March 2022 01:23 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/1 "2022-03-05T01:23:48Z")

</div>

Just curious as to why the spacing of naming the node is different between the mqtt in vs out?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a3d1a51338fcfb472a3eab8fa652b383e1a5f902.png)  
As you can see the unifi 'out' node is larger than the 'in' node, yet it they are the same character count..  
It looks like spacing is added in front of the text, but i have not added it..

Nothing wrong with functionalty, just purely a cosmetic question  
Cheers

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 March 2022 08:02 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/2 "2022-03-05T08:02:05Z")

</div>

I can confirm I see that too. Node red 2.2.2 in Chrome (on Ubuntu).

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [5 March 2022 09:02 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/3 "2022-03-05T09:02:23Z")

</div>

All output type nodes do it

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2cb8900be39f9ec9310df1e165990c5e9109597d.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 March 2022 09:21 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/4 "2022-03-05T09:21:00Z")

</div>

It isn't the difference between in and out it is the different spacing at the front of the out dependent on string length.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [5 March 2022 09:25 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/5 "2022-03-05T09:25:30Z")

</div>

It isn't intentional - possibly a completely unnoticed (at least, unreported until now) side-effect of how we pad the text depending on where the icon is.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [5 March 2022 09:40 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/6 "2022-03-05T09:40:02Z")

</div>

Noticed it for a long time but never thought it worth mentioning as assumed there was a good reason for it 🙂

---

<div class="post-metadata">

**Author:** ![sneakynuts](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@sneakynuts](https://discourse.nodered.org/u/sneakynuts)\
**Post date:** [5 March 2022 09:57 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/7 "2022-03-05T09:57:18Z")

</div>

I only noticed it last night when I was redoing some of my flows!  
Odd thing is, the bottom row nodes don't mismatch!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 March 2022 10:11 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/8 "2022-03-05T10:11:10Z")

</div>

If you drop characters of the right of `unifi` you will find that the padding switches at some point.

---

<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:** [4 May 2022 10:11 UTC](https://discourse.nodered.org/t/mqtt-node-name-formatting/59391/9 "2022-05-04T10:11:19Z")

</div>

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