# Use mqtt-broker for new other nodes

**URL:** https://discourse.nodered.org/t/use-mqtt-broker-for-new-other-nodes/50338
**Category:** Developing Nodes
**Created:** [28 August 2021 22:10 UTC](https://discourse.nodered.org/t/use-mqtt-broker-for-new-other-nodes/50338 "2021-08-28T22:10:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Thomassorensen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thomassorensen/32/45692_2.png) [@Thomassorensen](https://discourse.nodered.org/u/Thomassorensen)
#### Post date: [28 August 2021 22:10 UTC](https://discourse.nodered.org/t/use-mqtt-broker-for-new-other-nodes/50338/1 "2021-08-28T22:10:54Z")

</div>

H All,

I'm working on a new node-red-contrib-simple-mqtt-sparkplug node, that will hopefully make it a lot easier to work with Sparkplug B in Node-Red.

The work on the node is going pretty well, and I got everything sorted out, except for one detail. I'm thinking about using the existing mqtt-broker type used by the build it MQTT nodes. I think it will give the user a better experience if they only have one place to configure their MQTT brokers..

The problem with that approach is that Sparkplug B requires a last-will. My idea is to check if the last-will is already configured by the user on the mqtt-broker, and generate a node.error if its already configured. Not a perfect solution, but its better than having to crate a new type mqtt-broker-sparkplug type (I think?).

Is there any way to me to check/edit the mqtt-broker last-will BEFORE any MQTT in or MQTT out nodes makes the broker connect to the broker? And is it a good idea to use the existing mqtt-broker type? or should I make a copy of the broker type instead?

---

<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 October 2021 22:11 UTC](https://discourse.nodered.org/t/use-mqtt-broker-for-new-other-nodes/50338/2 "2021-10-27T22:11:44Z")

</div>

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