Skip to content

HiveMQ Testcontainer 1.3.0 Released

by HiveMQ Team
2 min read

The HiveMQ team is pleased to announce the release of HiveMQ Testcontainer 1.3.0. This new version adds the following features:

  • Loading of Gradle-based HiveMQ Extensions

  • API for removing prepacked HiveMQ Extensions

Load an extension from a gradle project

You can package and load an extension from a Gradle project, by providing the location of the Gradle project:

JUnit 4

@Rule
public final @NotNull HiveMQTestContainerRule rule =
    new HiveMQTestContainerRule()
        .withExtension(new GradleHiveMQExtensionSupplier(new File("path/to/extension/")).get());

JUnit 5

@RegisterExtension
public final @NotNull HiveMQTestContainerExtension extension =
  new HiveMQTestContainerExtension()
      .withExtension(new GradleHiveMQExtensionSupplier(new File("path/to/extension/")).get());

If your current project is the HiveMQ Extension you want to load into the HiveMQ Testcontainer, you can simply use:

GradleHiveMQExtensionSupplier.direct()

Remove prepackaged HiveMQ Extensions

Since HiveMQ’s 4.4 release, HiveMQ Docker images come with the HiveMQ Extension for Kafka, the HiveMQ Enterprise Bridge Extension and the HiveMQ Enterprise Security Extension. These Extensions are disabled by default, but sometimes you may need to remove them before the container starts.

JUnit4

Remove all prepackaged extensions:

@Rule
final HiveMQTestContainerRule container = new HiveMQTestContainerRule("hivemq/hivemq4", "4.4.4")
    .withoutPrepackagedExtensions();

Remove specific prepackaged extensions:

@Rule
final HiveMQTestContainerRule container = new HiveMQTestContainerRule("hivemq/hivemq4", "4.4.4")
    .withoutPrepackagedExtensions("hivemq-kafka-extension");

JUnit5

Remove all prepackaged extensions:

@RegisterExtension
final HiveMQTestContainerExtension container = new HiveMQTestContainerExtension("hivemq/hivemq4", "4.4.4")
    .withoutPrepackagedExtensions();

Remove specific prepackaged extensions:

@RegisterExtension
final HiveMQTestContainerExtension container = new HiveMQTestContainerExtension("hivemq/hivemq4", "4.4.4")
    .withoutPrepackagedExtensions("hivemq-kafka-extension");

HiveMQ Team

Team HiveMQ shares deep expertise in MQTT, Industrial AI, IoT data streaming, Unified Namespace (UNS), and Industrial IoT protocols. Our blogs explore real-world challenges, practical deployment guidance, and best practices for building modern, reliable, and a secure data backbone on the HiveMQ platform, along with thought leadership shaping the future of the connected world.

We’re on a mission to build the Industrial AI Platform that transforms industrial data into real-time intelligence, actionable insights, and measurable business outcomes.

Our experts are here to support your journey. Have questions? We’re happy to help. Contact us.

HiveMQ logo
Review HiveMQ on G2