Use mqtt-broker for new other nodes

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?