Apache ActiveMQ Configuration in Windows

This tutorial will show you how you can configure Apache ActiveMQ in Windows platform.

For more information please log on to http://activemq.apache.org/

Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server. It is fast and supports many Cross Language Clients and Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4.


Supports a variety of Cross Language Clients and Protocols from Java, C, C++, C#, Ruby, Perl, Python, PHP

Full support for Enterprise Integration Patterns both in the JMS client and the Message Broker

Supports many advanced features such as Message Groups, Virtual Destinations, Wildcards and Composite Destinations

Full support for JMS 1.1 and J2EE 1.4 with transient, persistent, transactional and XA messaging

ActiveMQ can be easily embedded into Spring applications and configured using Spring’s XML configuration mechanism

Tested inside popular JEE servers such as TomEE, Geronimo, JBoss, GlassFish and WebLogic

Supports pluggable transport protocols such as in-VM, TCP, SSL, NIO, UDP, multicast, JGroups and JXTA transports

Supports very fast persistence using JDBC along with a high performance journal

Designed for high performance clustering, client-server, peer based communication

REST API to provide technology agnostic and language neutral web based API to messaging

Ajax to support web streaming support to web browsers using pure DHTML, allowing web browsers to be part of the messaging fabric
CXF and Axis Support so that ActiveMQ can be easily dropped into either of these web service stacks to provide reliable messaging
Can be used as an in memory JMS provider, ideal for unit testing JMS

Steps to configure Apache ActiveMQ

1. Download Apache ActiveMQ from http://activemq.apache.org/
2. Extract the downloaded file, i.e., apache-activemq-x.yy.z-bin.zip to a drive D:
3. Navigate to D:apache-activemq-x.yy.zbin directory from the command prompt and execute the command activemq start
4. Once the ActiveMQ gets started you will see the similar output at the end in the command prompt

INFO | Listening for connections at: tcp://admin-PC:61616?maximumConnections=10
 INFO | Connector openwire started
 INFO | Listening for connections at: amqp://admin-PC:5672?maximumConnections=10
 INFO | Connector amqp started
 INFO | Listening for connections at: stomp://admin-PC:61613?maximumConnections=
 INFO | Connector stomp started
 INFO | Listening for connections at: mqtt://admin-PC:1883?maximumConnections=10
 INFO | Connector mqtt started
 INFO | Listening for connections at ws://admin-PC:61614?maximumConnections=1000
 INFO | Connector ws started
 INFO | Apache ActiveMQ 5.11.1 (localhost, ID:admin-PC-49825-1429064854383-0:1)
 INFO | For help or more information please see: http://activemq.apache.org
 INFO | ActiveMQ WebConsole available at
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | jolokia-agent: No access restrictor found at classpath:/jolokia-access.x
ml, access to all MBeans is allowed

So we have got many connections establishment and for WebConsole the URL should be http://localhost:8161/

5. Now open http://localhost:8161/ in the browser and click on link Manage ActiveMQ broker; when prompt for the username and password, put admin/admin
6. Next you will see many links such as Home, Queues, Topics, Subscribers etc.
7. Now click on Queues. Next give a Queue name – TestQueue – in the input box and click on Create.

ActiveMQ create a Queue
8. Click on Send To link to the right side of the TestQueue name row

ActiveMQ click on link Send To
9. Now create a message and send it to TestQueue

ActiveMQ create a message and send it to TestQueue
10. Once you click on Send button you will see one message is enqueued in the TestQueue. As no consumer is defined for this TestQueue, so message will not be dequeued from TestQueue.

ActiveMQ message pending in TestQueue
11. Now click on TestQueue, then click on Message ID (ID:…). You will see the message details.

Note: You must have JDK installed

For maven based application please add the following dependency to your pom.xml file

	<!-- activemq -->

That’s all. We will more examples on ActiveMQ later.
Thank you for reading.

Related posts

Leave a Comment