What is HiveMQ ?
As members of the OASIS committee, the HiveMQ team was directly involved in the creation and release of MQTT 5.0, the newest version of the lightweight protocol. It is 100% MQTT compliant and implements all MQTT features in single and clustered deployments.
Supported MQTT versions
The following MQTT versions are fully supported:
Supported MQTT features
All MQTT features are 100% supported for single node and clustered deployments, including:
- Retained Messages
- QoS 0
- QoS 1
- QoS 2
- Clean & Persistent Sessions
- Queued Messages
- Last Will and Testament (LWT)
- Dynamic Topics
- Wildcard Subscriptions
- Username / Password Fields
- MQTT Client Takeovers
- MQTT Ordered Topic guarantees for QoS 1 and 2
- MQTT Client Load Balancing with Shared Subscriptions
- Bare Metal Servers
- Cloud Environments (AWS, Microsoft Azure, Google Cloud Platform)
- Kubernetes & Openshift
Recommended: How To Create Secure MQTT Broker
HiveMQ is a high performance MQTT broker and is designed to run on server hardware. While HiveMQ also runs on embedded devices, its full potential is unleashed on server hardware.
- Production: Linux is the only supported operating system for production environments. CentOS7 or other RHEL-based distributions are recommended.
- Development: Windows, Mac OS X or Linux.
Minimum Hardware Requirements
- At least 4GB of RAM
- 4 or more CPUs
- 10GB or more free disk space.
- Production: OpenJDK JRE 11 or newer is required.
- Development: OpenJDK JDK 11 or newer is recommended.
Installation on Unix based systems (Linux, BSD, MacOS X, Unix)
The default installation directory is
/opt/hivemq and the default user to run HiveMQ is named
hivemq. If you need to install HiveMQ to a custom directory or run it under a custom user please be aware of changing the
$HIVEMQ_DIRECTORY and/or the
HIVEMQ_USER in the
- Login as root
Some of the following commands need root privileges, please login as root or use sudo to execute the commands.
- Change directory to where you want to download and install HiveMQ. By default we prefer
- Get your evaluation version from our website.
- Copy the provided download link and download Hive MQ
wget --content-disposition <your download link>
curl -O -L <your download link>
- Extract the files
- Create hivemq symlink
ln -s /opt/hivemq-<version> /opt/hivemq
- Create HiveMQ user
useradd -d /opt/hivemq hivemq
- Make scripts executable and change owner to
chown -R hivemq:hivemq /opt/hivemq-<version> chown -R hivemq:hivemq /opt/hivemq cd /opt/hivemq chmod +x ./bin/run.sh
- Adjust the configuration properties to your needs.
See chapter Configuration for detailed instructions how to configure Hive MQ.
- Install the init script (optional)
For Debian-based linux like Debian, Ubuntu, Raspbian using init.d scripts
cp /opt/hivemq/bin/init-script/hivemq-debian /etc/init.d/hivemq chmod +x /etc/init.d/hivemq
For linux systems using systemd
cp /opt/hivemq/bin/init-script/hivemq.service /etc/systemd/system/hivemq.service
For all other linux systems
cp /opt/hivemq/bin/init-script/hivemq /etc/init.d/hivemq chmod +x /etc/init.d/hivemq
- Modify /etc/init.d/hivemq (optional)
Set the HIVEMQ_HOME and the HIVEMQ_USER variable to the correct values for your system.
By default this would be:
If you installed HiveMQ to a different directory than
/opt/hivemqplease point the HIVEMQ_HOME in your init script to the correct directory. Otherwise the daemon will not start correctly.
- Start Hive MQ on boot (optional)
For Debian-based linux like Debian, Ubuntu, Raspbian
update-rc.d hivemq defaults
For Debian-based linux like Debian, Ubuntu, Raspbian using systemd
systemctl enable hivemq
Debian > 6.0
CentOS or RHEL
chkconfig hivemq on
The following instructions show how to start HiveMQ after the installation.
- Change directory to HiveMQ directory
- Execute startup script
Starting as daemon
- Start the daemon
Verify if HiveMQ is running
Check if HiveMQ is listening to the default port for MQTT
netstat -an | grep 1883
If you’re running HiveMQ as daemon:
- Download the latest HiveMQ version from our website
- Extract the file hivemq.zip to C:\hivemq using your favorite Zip unpack utility.
Installation as Windows Service
The steps to install HiveMQ as a Windows Service are:
- Download the hivemq-windows-service.zip file from here
- Unzip the hivemq-windows-service.zip file.
- Copy the windows-service folder to your HiveMQ home folder.
- Open the windows-service folder.
- Double click the installService.bat file.
|Make sure you have the permission to install a service. Therefore it might be necessary to right click the installService.bat and select Run as administrator.|
The following instructions show how to start HiveMQ after installing:
Double click on the run.bat file.
|Please keep in mind that a click with the left mouse button (QuickEdit) stops the output of the command line. When you click the command line before “Started HiveMQT in xxx ms” is displayed, the HiveMQ start up is interrupted and needs to be continued via a click of the right mouse button. A click after the HiveMQ start up has no impact on the execution of HiveMQ.|
Verify if HiveMQ is running
Check if HiveMQ is listening to the default port for MQTT.
Open cmd.exe and run:
netstat -an | find "1883"
Installing a HiveMQ MQTT Broker license
Installing a HiveMQ license is as simple as moving the
hivemq.lic file provided with your purchases into the
license folder of your HiveMQ installation.
Licenses can be added during run time and will be automatically and dynamically recognized by HiveMQ.
When a valid license file is found, HiveMQ logs a statement similar to the following:
2018-08-20 20:49:44,322 INFO - Found valid site license (hivemq.lic) issued to XXX for max XXX connections, valid until XXX.
Multiple license files
A newly obtained license can be added during runtime. When multiple valid license files are recognized by HiveMQ, the license allowing the higher number of concurrent connections will automatically be selected.
In case multiple valid licenses for the same amount of concurrent connections are found HiveMQ will select the license that has a longer validity.
A restart of HiveMQ is not necessary for switching or adding licenses during runtime.
I hope you like this post “HiveMQ MQTT Broker Overview | Installation”. Do you have any questions? Leave a comment down below!
Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog.
You may like also:
- 5G technology
- LPWA – Low-Power Wide-Area
- eCall – Emergency Call System
- Symphony Link – Best Alternative of LoRaWAN
- Dot-triple-O Domain
- How To Create Secure MQTT Broker
- Setting up Authentication in Mosquitto MQTT Broker
- IoT Communication APIs
- IoT Enabling Technologies
- Best Arduino IDE alternatives to start programming
- Best IoT Visual Programming Tools