How To Update Apache ActiveMQ Artemis

3 min read
ActiveMQ Artemis logo

This blog post describes how to update a Message Broker to a newer version of ActiveMQ Artemis without copy and pasting configuration files and other stuff.

What is Apache ActiveMQ Artemis?

Apache ActiveMQ is a subproject of Apache ActiveMQ. It has been donated to the Apache Software Foundation in 2015. There were lots of changes in project names in the past. The Artemis project first started as JBoss Messaging and got renamed to HornetQ in August 2009. They decided to rename it and separate it as an independent project since it differs in a many ways from JBoss Messaging 1.x and they didn't want to confuse the two, quite different, systems. The vast majority of the code base of HornetQ is different to the code base of JBoss Messaging 1.x. Some years later in 2015 they donated HornetQ to the Apache Software Foundation. As a subproject of ActiveMQ it became part of the ActiveMQ umbrella.

How to create a new Artemis Broker?

The standard Apache ActiveMQ is runnable out of the box. Just download it, go into the unzipped ActiveMQ folder and run this command: ./bin/activemq run.
The ActiveMQ Artemis subproject needs an additional step to run the Message Queue. Before running activemq run you have to create a new message broker instance. It looks like an overhead at first glance, but becomes very practically when updating to a new Artemis version for example. To create a artemis broker run: ./bin/artemis create $HOME/mybroker on your command line.

Note: I recommend choosing a different folder than the downloaded apache-artemis one to separate both from each other. This separation allowes you run multiple brokers with the same artemis runtime for example. In the next step change directory (cd) to the formerly created mybroker/bin folder and run the broker.

How to update ActiveMQ Artemis?

Go in the etc folder of your formerly created message broker and open artemis.profile. This file contains some properties like Java Opts, Clustering properties and these two locations:

ActiveMQ Artemis logo
As you can see, the ARTEMIS_HOME variable is used to link the broker and the artemis runtime together. In case you want to update your broker you can simply download the new version of ActiveMQ Artemis and change the path in the artemis.profile of your broker instance. That's all. There is no need to touch your broker, copy configuration files or stuff like that :-)

Conclusion

In my opinion the concept of the separated broker instance is really nice because it's much easier to update to a newer version of ActiveMQ Artemis than it was with standard ActiveMQ. You don't need to copy paste configuration files anymore and you don't need to be afraid of updating your Message Oriented Middleware because the separated Broker instance stays stable and compatible to newer versions without changing your configurations.

Hope you enjoyed the tutorial. Give it a try and download the current version of Artemis! It comes with a great documentation and lots of examples which are running out of the box.

Bye,
Bennet

Further Readings

  1. http://hornetq.blogspot.de/2009/08/hornet-hatches.html
  2. http://hornetq.blogspot.de/2015/06/hornetq-apache-donation-and-apache.html
  3. http://activemq.apache.org/artemis
  4. https://www.infoq.com/news/2010/09/hornetq-benchmark
  5. https://developer.jboss.org/wiki/HornetQ-thePerformanceLeaderinEnterpriseMessaging

Be Social, Share!