Thanks to work done by Adam Rudd, mosquitto is now available in the Mac package manager homebrew. Once you’ve installed homebrew (see the link), you can install mosquitto with:

brew install mosquitto