/simple-activemq-messaging

Simple Spring Boot App demonstrating Messaging via ActiveMQ.

Primary LanguageJava

simple-activemq-messaging

A simple Spring Boot application using Spring Boot with ActiveMQ Message Broker

Prequisites:

You can download ActiveMQ on the above website, or if you have Docker installed, grab an image from Docker Hub and run the image.

docker pull rmohr/activemq
docker run -p 61616:61616 -p 8161:8161 rmohr/activemq

How to build and run

Assuming Java, Maven and ActiveMQ are already installed on your local machine

mvn clean package

the producer application

cd producer
mvn spring-boot:run

or

cd producer
java -jar target/producer-0.0.1-SNAPSHOT.jar

the consumer application

cd consumer                              
mvn spring-boot:run

or

cd consumer
java -jar consumer-0.0.1-SNAPSHOT.jar

create and send a message

curl -i http://localhost:8080/producer/YourMessage