Simple example of ActiveMq Classic implementation. After application start-up it will send up 2 messages on the queue and then application will pull and read sent messaged. This will recur every 10 seconds.
Tested with apache-activemq-5.16.1 which is available on: https://activemq.apache.org/activemq-5016001-release
On Windows OS simply execute following file: ..\apache-activemq-5.16.1-bin\apache-activemq-5.16.1\bin\win64\activemq.bat