Prequisites:
- Java 14
- Apache Maven
- Apache ActiveMQ Message Broker
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
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