wasp

module
v4.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2020 License: MPL-2.0

README

Wasp

FOSSA Status Codacy Badge

Distributed MQTT broker, written in Go.

Project status disclaimer

This project is a "personnal hobby playground" project.

It won't suit your needs if you are looking for an entreprise-grade MQTT Broker.

For example, Security, Release management, Automated feature and performance testing, Technical support (this list is obviously non-exhaustive)... are jobs that this project team does NOT do, or actively work on.

However, if you want to play and learn with Golang, MQTT, Gossip, GRPC, and other fun technologies, have fun with this project, and fell free to contribute by forking the project, hacking on it, or submiting a Pull Request !

Installing

Wasp is currently released as a built binary file, you just have to download it, make it executable, and run it.

Linux

If you are using Archlinux, an AUR package is available (named wasp). For other Linux distributions, you can run the following shell one-liner:

curl -sLo Downloads/wasp https://github.com/vx-labs/wasp/v4/releases/download/v4.0.0/wasp_linux-amd64 && chmod +x ./Downloads/wasp

Il will download Wasp, save it in your ./Downloads folder, and make it executable.

Running Wasp on your workstation

Once downloaded, you can run Wasp by simply invoking it in your shell.

./Download/wasp

Wasp by default runs an MQTT listener on port 1883, and will print on the terminal the IP adfress ip it detected. You can connect to it using an MQTT client, like Mosquitto.

mosquitto_sub -t 'test' -d -q 1 &
mosquitto_pub --port 1884 -t 'test' -d -q 1 -m 'hello'
Increasing log level

Wasp use a leveled logger, supporting traditional level name.

  • debug
  • info
  • warning
  • error

It will by default only print warning and error messages. You can alter this behaviour by adding the log-level flag when invoking Wasp.

For example, if you want to display info messages and above, you can type:

./Downloads/wasp --log-level info
Persisting data between restarts

Wasp builds a State to store all retained messages, subscriptions, session metadatas, ... etc. This state is saved on a filesystem, by the default Wasp configuration is to save it in /tmp/wasp.

This folder is, in most workstation configuration, erased at startup.

If you want your Wasp data to survive a host reboot, you must change this location by passing the data-dir flag.

For example, if you want to save Wasp data in the wasp-data folder, you can run the following command.

./Downloads/wasp --data-dir ./wasp-data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL