Over a million developers have joined DZone.

How to Update Apache ActiveMQ Artemis

DZone 's Guide to

How to Update Apache ActiveMQ Artemis

ActiveMQ Artemis supports separating the installation from the configuration, making upgrades easier.

· Java Zone ·
Free Resource

This blog post describes how to update a Message Broker to a newer version of ActiveMQ Artemis without copying 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 practical when updating to a new Artemis version.

To create an Artemis broker, run: ./bin/artemis create $HOME/mybroker on your command line. Note: I recommend choosing a different folder than the downloaded apache-artemis to separate the two from each other. This separation allows 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:

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 :-)


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.

activemq ,artemis ,java ,message broker

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}