Is "fosquitto" usable as MQTT broker?

I was looking to install some MQTT broker onto my Turris Omnia and noticed that moquitto was already running with config in /tmp/fosquitto.generated.conf

  1. Is this used internally by Turris? What for?
  2. Can I (also) use it for my own topics?
  3. How do I reconfigure it? Apparently there’s a “generated” config, how to tweak and regenerate it? Mainly to make it listen on br-lan interface and also to configure bridging some topics to another MQTT broker.
  4. Or am I better off running a separate copy of mosquitto? Should I install a separate package or is the “fosquitto” binary ok to use?

Thanks!

  1. fosquitto is a specifically configured mosquitto instance used internally as a message bus for Foris.
  2. Technically, you can. But it is discouraged.
  3. fosquitto configuration is regenerated when reloading the configuration, e.g. /etc/init.d/fosquitto reload. Some parameters are specified in /etc/config/fosquitto but most of them are hard-wired in the /etc/init.d/fosquitto script because those are not intended to be modified.
  4. It’s much better to do so. You need not install a separate package because the same binary as for fosquitto can be used (contained in the dependent mosquitto package). There are more options but the default is that mosquitto is configured by /etc/mosquitto/mosquitto.conf. Here you can set what you want (but beware of port collisions with fosquitto!) and then run mosquitto by /etc/init.d/mosquitto start (or create a symlink in /etc/rc.d).
2 Likes

Great, thanks for a prompt reply!

1 Like