ActiveMQ Hello World

ActiveMQ Hello World

This is simple ActiveMQ JMS example using multiple thread, concurrent, producer and consumers. Just to give idea how ActiveMQ works we will create a queue and produce message on it and consumer will consume it. Please follow steps below:

  • Create maven java project as below:

2015-02-25_2245

  • pom.xml:

  • Install ActiveMQ using this tutorial
  • Once installation is done start ActiveMQ server using below command

2015-02-25_2242

  • To find where to connect, open server console and search “tcp://” you will see as below that will be the connection point to connect ActiveMQ server. In our case we will connect to “tcp://JavaHonk:61616”

2015-02-25_2237

  • Java client ActiveMQHelloWorld.java

  • Output:

2015-02-25_2241

Leave a Reply

Your email address will not be published. Required fields are marked *