Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

ActiveMQ as docker-container for springboot testing

License

Notifications You must be signed in to change notification settings

springtainer/springtainer-activemq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

springtainer-activemq

Maven Central Build Nightly build Coverage report Quality Gate Technical dept

Attention

This project is no longer actively supported!

Dependency

<dependency>
  <groupId>com.avides.springboot.springtainer</groupId>
  <artifactId>springtainer-activemq</artifactId>
  <version>2.0.0</version>
  <scope>test</scope>
</dependency>

Configuration

Properties consumed (in bootstrap.properties):

  • embedded.container.activemq.enabled (default is true)
  • embedded.container.activemq.startup-timeout (default is 30)
  • embedded.container.activemq.docker-image (default is rmohr/activemq:5.15.9-alpine)
  • embedded.container.activemq.port (default is 61616)

Properties provided (in application-it.properties):

  • embedded.container.activemq.host
  • embedded.container.activemq.port

Example for minimal configuration in application-it.properties:

spring.activemq.broker-url=tcp://${embedded.container.activemq.host}:${embedded.container.activemq.port}

Logging

To reduce logging insert this into the logback-configuration:

<!-- Springtainer -->
<logger name="com.github.dockerjava.jaxrs" level="WARN" />
<logger name="com.github.dockerjava.core.command" level="WARN" />
<logger name="org.apache.http" level="WARN" />

Labels

The container exports multiple labels to analyze running springtainers:

  • SPRINGTAINER_SERVICE=activemq
  • SPRINGTAINER_IMAGE=${embedded.container.activemq.docker-image}
  • SPRINGTAINER_STARTED=$currentTimestamp