Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

36.moquette source code compilation and running

Shulou Source: shulou.com Published: 2022-06-03 04:55:30 10月03日 Update

I. profile

Moquette is a Java version of the broker implementation of the mqtt protocol.

Github source code: https://github.com/andsel/moquette

Google moquette group: https://groups.google.com/forum/#! forum/moquette-mqtt

There are a lot of people discussing moquette(need to ×× and log in to google account, and need to submit a group application)

II. clone source code

Go to Github and clone it.

III. compilation

Go to source code root directory and execute mvn clean package

You may need to install maven first.

IV. run

1. Decompress the compressed file generated after compilation

The generated zip file is located under: source directory/distribution/target/

2. Configure MOQUETTE_HOME as an environment variable, and the path is the decompression directory of your compiled files, such as:

MOQUETTE_HOME=/Users/huangrongwei/Documents/0_backup_program/moquette/distribution-0.11-SNAPSHOT-bundle-tar

3. cd $MOQUETTE_HOME

4. ./ bin/moquette.sh (run moquette.bat under bin directory under windows)

v. test

Open mqtt test client, I use eclipse paho client under windows

Establish connection, http://ip address:1883

Subscribe to topic

Another connection sends a topic to verify that it can be received

vi. change

Moquette authors have recently updated the maven compilation to gradle compilation.

Compile method to see the README.md file in the root directory of the source code

After compilation, there is a tar file generated in the distribution/build directory, which can be decompressed and executed.

Tags: Compile source code file directory build run root test author variable at the same time epigenetic address client method version environment introduction account Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Docker Linux MySQL MariaDB