Back to Testcontainers Java

ActiveMQ

docs/modules/activemq.md

2.0.51.9 KB
Original Source

ActiveMQ

Testcontainers module for ActiveMQ and Artemis.

ActiveMQContainer's usage examples

You can start an ActiveMQ Classic container instance from any Java application by using:

<!--codeinclude-->

Default ActiveMQ container inside_block:container

<!--/codeinclude-->

With custom credentials:

<!--codeinclude-->

Setting custom credentials inside_block:settingCredentials

<!--/codeinclude-->

ArtemisContainer's usage examples

You can start an ActiveMQ Artemis container instance from any Java application by using:

<!--codeinclude-->

Default Artemis container inside_block:container

<!--/codeinclude-->

With custom credentials:

<!--codeinclude-->

Setting custom credentials inside_block:settingCredentials

<!--/codeinclude-->

With anonymous login:

<!--codeinclude-->

Allow anonymous login inside_block:enableAnonymousLogin

<!--/codeinclude-->

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

=== "Gradle" groovy testImplementation "org.testcontainers:testcontainers-activemq:{{latest_version}}"

=== "Maven" xml <dependency> <groupId>org.testcontainers</groupId> <artifactId>testcontainers-activemq</artifactId> <version>{{latest_version}}</version> <scope>test</scope> </dependency>