Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/litongjava/mica-mqtt-server-native
mica-mqtt-server-native
https://github.com/litongjava/mica-mqtt-server-native
Last synced: about 1 month ago
JSON representation
mica-mqtt-server-native
- Host: GitHub
- URL: https://github.com/litongjava/mica-mqtt-server-native
- Owner: litongjava
- Created: 2023-12-10T12:31:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T16:14:24.000Z (about 1 year ago)
- Last Synced: 2023-12-16T16:37:19.428Z (about 1 year ago)
- Language: Java
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Mica MQTT Server Native
Mica MQTT Server Native is a high-performance messaging server based on Mica MQTT Server, supporting TCP, HTTP, and WebSocket protocols. It also supports building into binary files using GraalVM.
## Build Process
### Install GraalVM
1. Download and extract GraalVM:
```shell
wget https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-x64_bin.tar.gz
mkdir -p ~/program/
tar -xf graalvm-jdk-21_linux-x64_bin.tar.gz -C ~/program/
```2. Set environment variables:
```shell
export JAVA_HOME=~/program/graalvm-jdk-21.0.1+12.1
export GRAALVM_HOME=~/program/graalvm-jdk-21.0.1+12.1
export PATH=$JAVA_HOME/bin:$PATH
```### Install Maven
1. Download and extract Maven:
```shell
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip
unzip apache-maven-3.8.8-bin.zip -d ~/program/
```2. Set environment variables:
```shell
export MVN_HOME=~/program/apache-maven-3.8.8/
export PATH=$MVN_HOME/bin:$PATH
```### Download Code
```shell
git clone https://github.com/litongjava/mica-mqtt-server-native.git
cd mica-mqtt-server-native/
```### Build Java Jar (Optional)
```shell
mvn package
java -jar target/mica-mqtt-server-native.jar
```### Build Binary Image
```shell
mvn clean package -DskipTests -Pmqtt-server-graal
```Successfully tested on GraalVM JDK 21 and GraalVM JDK 17.0.9+11.1.