ANTLab-polimi / MQTT-ST

Eclipse Mosquitto - An open source MQTT broker

Home Page:https://mosquitto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MQTT-ST: a Mosquitto fork

MQTT-ST is a MQTT broker which is able to create a distribute architecture of brokers, organized thorugh a spanning tree. It is based on the open source Mosquitto broker implementation. Our version adds a feature for interconnecting MQTT brokers automatically in a loop-free topology. Other Mosquitto features remain inalterated.

Links

See the following links for more information on MQTT-ST:

Creator information is available at the following locations:

Installing

Installing MQTT-ST is as installing Mosquitto. See the official documentation at https://mosquitto.org/download/ for details on installing binaries for various platforms.

Cluster quick start

Also the quick start for a single broker is the same as Mosquitto. More information at: https://github.com/eclipse/mosquitto#quick-start.

If you want to create a cluster of brokers, each broker must be spawned manually with a valid configuration file, i.e. mosquitto -c mosquitto.conf

Configuration file

MQTT-ST provides a mechanism for interconnecting automatically Mosquitto brokers in a loop free fashion. It is based on the bridging feature provided by Mosquitto (https://mosquitto.org/man/mosquitto-conf-5.html).

The bridges are created through the mosquitto.conf file. Every broker in the cluster must have a valid configuration file. The file includes a valid bridge to all the others brokers in the cluster. It consists in:

  • arbitrary connection name
  • broker destination address
  • broker destination port (if different to the default port 1883)
  • topic included in the cluster
  • topic forwarding option: it must be out for ensuring the correct behaviour. See https://mosquitto.org/man/mosquitto-conf-5.html for more details
  • QoS option: high QoS is suggested
  • remote broker id: anyone

Example

Here we show an example of a cluster composed by MQTT-ST brokers. For the sake of simplicity, only 3 brokers are used: A, B and C. However, MQTT-ST can support as many brokers as your machine can start.

Every broker in the cluster must be bridged to every one else. Each broker has a different .conf file containing bridges towards all the others brokers.

For instance, broker A configuration file:

connection AtoB
address 192.168.1.3:1883
topic # out 2
remote_clientid AtoB

connection AtoC
address 192.168.1.4:1883
topic # out 2
remote_clientid AtoC

Broker C configuration file:

connection BtoA
address 192.168.1.2:1883
topic # out 2
remote_clientid BtoA

connection BtoC
address 192.168.1.4:1883
topic # out 2
remote_clientid BtoC

And so on...

Future works

  • Develop a script which creates valid configuration files
  • Automatic discovery of MQTT-SN brokers
  • Create a tree for each topic in the syste

About

Eclipse Mosquitto - An open source MQTT broker

https://mosquitto.org

License:Other


Languages

Language:C 67.7%Language:Python 23.8%Language:C++ 3.1%Language:Makefile 2.3%Language:HTML 0.7%Language:CMake 0.6%Language:Dockerfile 0.5%Language:NSIS 0.4%Language:Shell 0.3%Language:CSS 0.2%Language:Perl 0.1%Language:Ruby 0.1%Language:XSLT 0.0%