This is just a very simple MQTT broker that can be used for debugging MQTT problems. It is just a broker that logs a lot.
This installs the testbroker
binary if you just want to run and not necessarily fiddle with the code.
go install github.com/borud/testbroker@latest