### Manage Server Lifecycle Source: https://github.com/apache/bifromq/blob/main/README.md Commands to start or stop the standalone BifroMQ server. ```bash ./standalone.sh start // This starts the server process in the background. ``` ```bash ./standalone.sh stop ``` -------------------------------- ### Run BifroMQ with Docker Source: https://github.com/apache/bifromq/blob/main/README.md Starts a single BifroMQ container. Ensure memory limits are set to avoid OOM termination. ```shell docker run -d -m -e MEM_LIMIT='' --name bifromq -p 1883:1883 apache/bifromq:${TAG} ``` -------------------------------- ### Launch Cluster Source: https://github.com/apache/bifromq/blob/main/README.md Command to start the defined Docker Compose services. ```shell docker compose up -d ``` -------------------------------- ### Configure BifroMQ Node Source: https://github.com/apache/bifromq/blob/main/README.md Example configuration for a cluster node. Update the host field for each specific node. ```yaml clusterConfig: env: "Test" host: bifromq-node1 # Change this to bifromq-node2 for node2 and bifromq-node3 for node3 port: 8899 seedEndpoints: "bifromq-node1:8899,bifromq-node2:8899,bifromq-node3:8899" ``` -------------------------------- ### Build BifroMQ Plugin Project Source: https://github.com/apache/bifromq/blob/main/bifromq-plugin/bifromq-plugin-archetype/src/main/resources/archetype-resources/README.md Run this Maven command to build the plugin. The output zip file will be in the target directory. ```bash mvn clean package ``` -------------------------------- ### Clone and Build Apache BifroMQ Source: https://github.com/apache/bifromq/blob/main/README.md Commands to clone the repository and build the project from source. ```bash cd git clone https://github.com/apache/bifromq bifromq ``` ```bash cd bifromq ./mvnw -v ./mvnw -U clean verify -DskipTests -Pbuild-release ``` -------------------------------- ### Run Tests and Coverage Source: https://github.com/apache/bifromq/blob/main/README.md Commands to prepare the environment, run unit tests, or generate coverage reports. ```bash ./mvnw clean install -DskipTests ``` ```bash ./mvnw test ``` ```bash ./mvnw test -Pbuild-coverage ``` -------------------------------- ### Generate BifroMQ Plugin Project Source: https://github.com/apache/bifromq/blob/main/bifromq-plugin/bifromq-plugin-archetype/src/main/resources/archetype-resources/README.md Use this Maven command to generate a new BifroMQ plugin project. Replace placeholder values with your project's specific details. ```bash mvn archetype:generate \ -DarchetypeGroupId=org.apache.bifromq \ -DarchetypeArtifactId=bifromq-plugin-archetype \ -DarchetypeVersion=${bifromqVersion} \ -DgroupId=com.yourcompany.newproject \ -DartifactId=your-plugin-name \ -Dversion=1.0.0-SNAPSHOT \ -DpluginName=YourPluginClassName \ -DpluginContextName=YourPluginContextClassName \ -DbifromqVersion=BifroMQVersion \ -DinteractiveMode=false ``` -------------------------------- ### Build Docker Image Source: https://github.com/apache/bifromq/blob/main/README.md Commands to build a Docker image from the generated tarball. ```bash ./release/docker-build.sh target/output/apache-bifromq-.tar.gz ``` ```bash ./release/docker-build.sh -t apache-bifromq: target/output/apache-bifromq-.tar.gz ./release/docker-build.sh -a arm64 target/output/apache-bifromq-.tar.gz ``` -------------------------------- ### Configure Native TLS Build Options Source: https://github.com/apache/bifromq/blob/main/README.md Maven commands to build with specific native TLS implementations. ```bash mvn -Pbuild-release -Pwith-tcnative -Dtcnative.classifier= clean verify -DskipTests ``` ```bash mvn -Pbuild-release -Pwith-boringssl-static -Dtcnative.classifier= clean verify -DskipTests ``` -------------------------------- ### Generate Plugin Project Source: https://github.com/apache/bifromq/blob/main/README.md Maven command to generate a new plugin project structure using the archetype. ```bash mvn archetype:generate \ -DarchetypeGroupId=org.apache.bifromq \ -DarchetypeArtifactId=bifromq-plugin-archetype \ -DarchetypeVersion= \ -DgroupId= \ -DartifactId= \ -Dversion= \ -DpluginName= \ -DpluginContextName= \ -DbifromqVersion= \ -DinteractiveMode=false ``` -------------------------------- ### Define Cluster with Docker Compose Source: https://github.com/apache/bifromq/blob/main/README.md Defines a three-node BifroMQ cluster using Docker Compose. Each node maps a local configuration file and exposes a unique port. ```yaml services: bifromq-node1: image: apache/bifromq:${TAG} container_name: bifromq-node1 volumes: - ./node1/standalone.yml:/home/bifromq/conf/standalone.yml ports: - "1883:1883" environment: - MEM_LIMIT=2147483648 # Adjust the value according to the actual host configuration. networks: - bifromq-net bifromq-node2: image: apache/bifromq:${TAG} container_name: bifromq-node2 volumes: - ./node2/standalone.yml:/home/bifromq/conf/standalone.yml ports: - "1884:1883" environment: - MEM_LIMIT=2147483648 networks: - bifromq-net bifromq-node3: image: apache/bifromq:${TAG} container_name: bifromq-node3 volumes: - ./node3/standalone.yml:/home/bifromq/conf/standalone.yml ports: - "1885:1883" environment: - MEM_LIMIT=2147483648 networks: - bifromq-net networks: bifromq-net: driver: bridge ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.