Giter Site home page Giter Site logo

antlab-polimi / mqtt-st Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edoardesd/mosquitto-st

7.0 1.0 2.0 6 MB

Eclipse Mosquitto - An open source MQTT broker

Home Page: https://mosquitto.org

License: Other

CMake 0.61% Makefile 2.32% Ruby 0.06% HTML 0.68% Python 23.82% C 67.74% Dockerfile 0.55% Shell 0.31% NSIS 0.40% C++ 3.14% Perl 0.14% XSLT 0.04% CSS 0.17%

mqtt-st's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.