Skip to content
forked from ulrich06/uTT

Lightweight and efficient MQTT broker prototype

License

Notifications You must be signed in to change notification settings

marcelmaatkamp/uTT

 
 

Repository files navigation

(NB (marcel): forked to build https://hub.docker.com/r/marcelmaatkamp/utt)

µTT ("microTT") is a lightweight and efficient MQTT broker designed to raise the bar for pub/sub performance. It significantly outperforms emqtt, Redis, HiveMQ, Mosquitto, RabbitMQ, Mosca and many others. Memory usage per connection is also significantly lower as it builds on the networking foundation developed for µWebSockets.

Read more about MQTT here, find client libraries here.

Vendor-neutral, minimal & efficient pub/sub

Below is a simple Node.js example using MQTT.js:

var mqtt = require('mqtt');

// connect to the broker
var client = mqtt.connect('mqtt://localhost');

client.on('connect', (err, granted) => {
  // subscribe to all temperature sensors
  client.subscribe('sensors/+/temperature', () => {
    // publish some temperature numbers
    client.publish('sensors/house/temperature', '21');
    client.publish('sensors/sauna/temperature', '107');
  });
});

client.on('message', (topic, message) => {
  // receive our numbers
  console.log(topic + ': ' + message.toString() + ' Celcius');
});

Compilation

The broker and matching benchmark can be compiled with a C++17 compiler using make on Linux:

git clone --recursive https://github.com/uNetworking/uTT.git
make

Both broker and benchmark are in a very experimental and broken state currently. This is all highly unstable and incomplete right now.

Benchmarks

A simple & automatic broadcasting benchmark has been developed to determine roughly the publishing performance of a few brokers under varying burst load. It supports both MQTT and Redis protocols to allow comparison with Redis (which has shown to be a good reference at small broadcasts).

  • HiveMQ is proprietary and limited to 25 connections in demo mode. I was to receive a full test version but was later denied this when they realized I was posting benchmark results.
  • Results in text form can be found in the benchmark_results file.

About

Lightweight and efficient MQTT broker prototype

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.2%
  • QMake 1.5%
  • Makefile 1.3%