springtainer-rabbitmq
Dependency
<dependency>
<groupId>com.avides.springboot.springtainer</groupId>
<artifactId>springtainer-rabbitmq</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
Configuration
Properties consumed (in bootstrap.properties
):
embedded.container.rabbitmq.enabled
(default istrue
)embedded.container.rabbitmq.startup-timeout
(default is30
)embedded.container.rabbitmq.docker-image
(default israbbitmq:3.8.4-alpine
)embedded.container.rabbitmq.port
(default is5672
)embedded.container.rabbitmq.virtual-host
(default is/
)embedded.container.rabbitmq.username
(default isguest
)embedded.container.rabbitmq.password
(default isguest
)
Properties provided (in application-it.properties
):
embedded.container.rabbitmq.host
embedded.container.rabbitmq.port
Example for minimal configuration in application-it.properties
:
spring.rabbitmq.addresses=${embedded.container.rabbitmq.host}:${embedded.container.rabbitmq.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=rabbitmq
SPRINGTAINER_IMAGE=${embedded.container.rabbitmq.docker-image}
SPRINGTAINER_STARTED=$currentTimestamp