Producer Consumer sample shows how to implement classical Producer Consumer Pattern using SpringBoot, ActiveMQ and how to deploy it with Docker. Scallability can be achieved by invoking more Consumer Docker images.
Installed: Docker, Java 1.7, Maven 3.x, ActiveMQ 5.x
$ git clone https://github.com/dstar55/docker-producer-consumer-activemq .
$ cd producer
$ ifconfig
Update spring.activemq.broker-url
property in file src/main/resources/application.properties
with IP address
$ spring.activemq.broker-url=tcp://xxx.xxx.xxx.xxx:61616
$ mvn clean install
$ mv ./target/producer*.jar ./data
$ docker build -t="producer" .
$ cd consumer
Update spring.activemq.broker-url
property in file src/main/resources/application.properties
with IP address of the Docker host
$ spring.activemq.broker-url=tcp://172.17.42.1:61616
$ mvn clean install
$ mv ./target/consumer*.jar ./data
$ docker build -t="consumer" .
$ /opt/activemq/bin/activemq start