Friday, January 10, 2014

JMS - Install ActiveMQ on Windows

activemq logo
Apache ActiveMQ is an open source message broker (JMS provider) written in Java, together with a full JMS client. Java Message Service (JMS) is an application programming interface (API) for sending messages between two or more clients. Following tutorial shows how to install ActiveMQ and perform a start/stop of the installed instance on Windows.


First thing to do is to download the ActiveMQ binaries. Go the the ActiveMQ download page and click on the latest stable release link in the Latest Releases section. Then in the Getting the Binary Distributions section click on the download link for your operating system. This will redirect to a mirrors page, click on the first link to download the binaries. At the time of writing the latest stable release was apache-activemq-5.10.0-bin.zip.

Extract the binaries archive downloaded in the previous step. The extracted root directory should contain a number of files and subdirectories as shown below. From now on we will refer to this directory as: [activemq_install_dir].

activemq install directory

Open a console window and navigate to [activemq_install_dir]. Change to the 'bin' subdirectory and execute the following command to start ActiveMQ:
activemq start

By default ActiveMQ will generate a number of log statements at start-up as shown below:

activemq start command

One of the logs will mention 'ActiveMQ WebConsole available at http://0.0.0.0:8161/'. This means that ActiveMQ was successfully started. Open the ActiveMQ WebConsole URL in a browser by entering http://localhost:8161/ and following page should be displayed:

activemq web console

Click on the Manage ActiveMQ broker link and enter following default credentials: User name="admin" and Password="admin". A welcome page will be displayed that shows some statistics on the ActiveMQ broker:

manage activemq web console

In order to stop ActiveMQ, press CTRL+C in the console in which it is running. Then type "Y" when prompted to 'Terminate batch job' followed by ENTER. The console will return to the prompt as shown below and ActiveMQ is stopped.

activemq stop command


This concludes setting up and configuring ActiveMQ. If you found this post helpful or have any questions or remarks, please leave a comment.

No comments:

Post a Comment