HiveMQ Testcontainer 1.3.0 Released
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 brings together deep expertise in MQTT, Industrial AI, IoT data streaming, UNS, and Industrial IoT protocols. Follow us for practical deployment guidance, best practices for building a secure, reliable data backbone, and insights into how we are shaping the future of connected industries.
Our mission is to transform industrial data into real-time intelligence, actionable insights, and measurable business outcomes.
Have questions or need support? Contact us. Our experts are ready to help.
