Getting Started with Mithqtt Broker
This page will help you get started with Mithqtt message broker.
Mithqtt broker is a MQTT message broker with scalability written in Java. A broker is basically the server part in the MQTT communication. Beside the MQTT 3.1.1 compatiable functionality Mithqtt broker also provides some extended functionality like building (high availability) clusters, deep integration into your application, enhanced authorization and authentication.
Pre-Installation requirements
Hardware:
- Memory: 512MB
- Disk space: at least 100MB free disk space.
Software:
- Operation System: Windows or Linux/Unix/BSD/Mac OS X
- Java: Oracle JDK 1.8 or newer.
- Redis: Redis Database 2.8 or 3.x.
- NATS: NATS Server 0.8 or newer.
Install Java
- Ubuntu/Linux Mint: Follow the instruction - Install Oracle Java 8 on Ubuntu or Linux Mint via ppa repository.
- Debian: Follow the instruction - Install Oracle Java 8 on Debian via repository.
- Windows: Download the binary release from the official site, and follow the instruction to install.
Install Redis
- Linux/Unix/BSD/Mac OS X: Follow the instruction - Download and install Redis.
- Windows: The Microsoft Open Tech group develops and maintains this Windows Port targeting Win64.
Install NATS Server
- Windows/Linux/Unix/BSD/Mac OS X: Download the binary release from the official site, and follow the instruction on its Github Repo to install.
Install Mithqtt Broker
Install from source code
git clone https://github.com/longkerdandy/mithqtt.git
cd mithqtt
./gradlew clean build -x test
Running on Linux/Unix/BSD/Mac OS X:
cd mithqtt-broker/build/distributions
tar -xvf mithqtt-broker-<VERSION>.tar
cd mithqtt-broker-<VERSION>
./bin/mithqtt-broker
Running on Windows:
Extract the Zip-archive from mithqtt-broker/build/distributions using your file browser into a directory of your choice
cd mithqtt-broker-<VERSION>
./bin/mithqtt-broker.bat
Configuration
This guide assuming you have already installed pre-requirements locally.
The Redis and NATS services must be up and running before starting Mithqtt Broker.
The configuration process is omitted, for more information please refer to Configuration.
Verify
You should be able to connect to your IP on the default MQTT port 1883
Linux/Unix/BSD
netstat -an|grep 1883
You should see a line like the following in the output
tcp46 0 0 *.1883 *.* LISTEN
Windows
Start the CMD and type:
netstat -an|find "1883"
GUI Tool
You can also use the Paho Graphical MQTT Client Tools to test Mithqtt Broker.
Updated less than a minute ago