scala-mqtt is a MQTT message broker written in Scala.
scala-mqtt implements the OASIS MQTT Version 3.1.1 standard.
- Publish with QoS 0
- Wildcard Topic Subscribe Support
- Persistence and Session Management
- Retain Message
- Will Message
- User Authentication
- Configuration file
- Publish with QoS 1 & QoS2
- Access control list (acl) file
The prerequisite are:
-
Clone the repository.
git clone https://github.com/bmp-git/PPS-18-scala-mqtt.git
-
Move into project directory.
cd PPS-18-scala-mqtt/
-
Launch the broker.
.\gradlew run
By default the application starts the MQTT broker on port 1883 but these settings can be changed by specifying different launch options inside the file "settings.conf".
The launch options can be defined in the file "settings.conf" according to the Mosquitto.conf syntax
Currently, only a small options subset is supported:
bind_address [address]
: bind the broker on the specified ip address/hostname.
port [number]
: start the broker on the specified port.
allow_anonymous [true | false]
: enable/disable anonymous access.
The file containing username and passwords is "users.conf".
You can add user's authentication information in the following way:
username:[sha256(password)]
: username with optionally a password hashed using sha256.
An docker image of the application can be built through the Dockerfile or can be pulled from this docker hub repo.
The container exposes port 1883 to access the broker.
Currently the docker container support the default configuration:
bind_address localhost
port 1883
allow_anonymous true
Edoardo Barbieri, Lorenzo Mondani, Emanuele Pancisi
Developed as final project for 81612 - Programming and Development paradigms course (academic year 2018/2019).