Mosquitto

Article description::Mosquitto is an open source MQTT message broker provided by the Eclipse foundation.

Additional software
Libraries/ integration, e.g. Eclipse Paho.

Files

 * - Global (system wide) configuration file.
 * - per user defaults for command mosquitto_sub
 * - per user defaults for command mosquitto_pub

Listeners:
 * have at least a single listener so remote connections are possible
 * specify the network interface with bind_interface to if only one out of many is allowed
 * configure multiple listeners with enabled per-listener-configuration to separate contexts or shard traffic

Security:


 * memory_limit to avoid resource exhaustion
 * message_size_limit so the broker rejects payloads being too large
 * persistent_client_expiration to allow cleaning stale clients

Monitoring


 * log_dest, preferrably /var/log/mosquitto.log, in conjunction with log_type and optionally connection_messages

Usage
The package provides the broker and tools to directly interact with it. The following command subscribes to a topic announce/info on a given host with port 8883 – assuming the broker was configured with a TLS listener (process runs until stopped):

To publish the message This broker is up and running to the same topic on the same host with a different user:

This message now shows up in the output of the first command.

External resources

 * (Link to external resources (outside the Wiki) using bullet points in this section. It is common for the information in this section to full sentences that are links.)