MQTT Upgrade - Least Disruptive Suggestions

I currently have a single Mosquito MQTT server on a standalone Linux VM. When I initially implemented MQTT it was to have a couple of items talking, but as with most things it has grown way beyond that.

I also didn’t implement login/password on my Mosquito MQTT server, which gives me cause for concern with the scale it has grown.

So it is time to upgrade/replace my MQTT server, and I am wondering what might be the least disruptive approach… options I’ve considered:-

  • Keeping my current Mosquito server and adding login/password - disruptive to existing environment

  • Create a new Mosquito server with login/password - enables gradual cut over - but wont talk to existing server

  • Create a new Mosquito server with MQTT bridge and login/password - allows cut over of each device in a simple approach and ensures everything is connected.

I’ve done loads of reading, but not sure what is the best approach? Looking for some advice, tips, hints on the approaches people have taken that have worked well.

Found a way forward which I thought I would share.

Created a new Mosquitto MQTT server, which has login/password implemented. The new MQTT server has been ‘bridged’ to the old MQTT server, and appears to be working well.

I have migrated several esphome devices to the new MQTT server (using login/password), and from here I can gradually migrate everything else.

Once everything is migrated I can shutdown the old MQTT server.

I did very much the same.
What I would like is to be able to see which users are logged in (as MQTT topics) but I don’t think that’s easily done. Possibly tracking the debug logging is an option, I couldn’t find anyone who’d done this though which surprised me.

Awesome idea, I wonder if that can be done? I haven’t seen a Mosquitto option for announcing logins on a topic… but it could be done with something tracking the Mosquitto log I suppose, and then push an announcement to a topic.