Skip to content

springtainer/springtainer-rabbitmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

springtainer-rabbitmq

Maven Central Build Nightly build Coverage report Quality Gate Technical dept

Dependency

<dependency>
  <groupId>com.avides.springboot.springtainer</groupId>
  <artifactId>springtainer-rabbitmq</artifactId>
  <version>1.4.0</version>
  <scope>test</scope>
</dependency>

Configuration

Properties consumed (in bootstrap.properties):

  • embedded.container.rabbitmq.enabled (default is true)
  • embedded.container.rabbitmq.startup-timeout (default is 30)
  • embedded.container.rabbitmq.docker-image (default is rabbitmq:3.11.10-alpine)
  • embedded.container.rabbitmq.port (default is 5672)
  • embedded.container.rabbitmq.virtual-host (default is /)
  • embedded.container.rabbitmq.username (default is guest)
  • embedded.container.rabbitmq.password (default is guest)

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