I decided to Spring-ify my previous attempt at configuring and running a HelloWorld program using Apache Qpid which was set up locally and you can read all about that here: Apache Qpid setup for dummies.

In order to use Spring Boot, I modified the code (mostly followed autoconfiguration code from https://github.com/tabish121/qpid-jms-spring-boot/tree/master/qpid-jms-spring-boot-autoconfigure):

  1. Use Spring Boot autoconfiguration to load JMS connection factory details
  2. Schedule a simple message to be delivered to the queue every 5 seconds (@EnableScheduling is wonderful)
  3. A JMS Listener to receive the messages and log to the console.

 

The modified code can be found at https://github.com/trishulpani/qpid-helloworld/tree/helloqpidspringboot

 

Advertisements