Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hivemq/hivemq-community-edition/llms.txt

Use this file to discover all available pages before exploring further.

Install HiveMQ Community Edition Embedded Mode by adding the dependency to your project’s build configuration.

Requirements

  • Java Version: Java 11 or higher
  • Build Tool: Maven or Gradle
  • Latest Version: 2025.5
You must set the compiler version to Java 11 or higher in your build configuration.

Maven Installation

Add the following dependency to your pom.xml file:
pom.xml
<project>
    ...
    <dependencies>
        <dependency>
            <groupId>com.hivemq</groupId>
            <artifactId>hivemq-community-edition-embedded</artifactId>
            <version>2025.5</version>
        </dependency>
    </dependencies>
    ...
</project>

Compiler Configuration

Ensure your Maven compiler plugin is set to Java 11 or higher:
pom.xml
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.11.0</version>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
        </plugin>
    </plugins>
</build>

Gradle Installation

Add the following dependency to your build.gradle or build.gradle.kts file:
dependencies {
    implementation 'com.hivemq:hivemq-community-edition-embedded:2025.5'
}

Compiler Configuration

Ensure your Gradle build is configured for Java 11 or higher:
java {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

Verify Installation

Verify the installation by creating a simple test:
import com.hivemq.embedded.EmbeddedHiveMQ;

public class VerifyInstallation {
    public static void main(String[] args) {
        try (EmbeddedHiveMQ hivemq = EmbeddedHiveMQ.builder().build()) {
            System.out.println("HiveMQ Embedded installed successfully!");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
If the code compiles and runs without errors, the installation is successful.

Available Artifacts

The embedded dependency is available from:
  • Maven Central: com.hivemq:hivemq-community-edition-embedded
  • JitPack: Alternative source for builds
  • JavaDoc: Available at javadoc.io

Dependency Information

The embedded artifact includes all necessary dependencies to run HiveMQ, including:
  • HiveMQ Core
  • Extension SDK
  • RocksDB for persistence (can be excluded if needed)
  • Logback for logging (can be excluded if using another logging framework)
  • Metrics library (Dropwizard Metrics)
See the Dependency Exclusions guide if you need to exclude certain dependencies from your build.

Next Steps

Quick Start

Create your first embedded HiveMQ broker