Deployment guide

Apache Artemis

Overview

Apache ActiveMQ Artemis is a next-generation, high-performance, multi-protocol Java message broker. It implements the JMS API and speaks the ActiveMQ core protocol, AMQP 1.0, STOMP and MQTT. Its asynchronous journal and non-blocking architecture deliver high throughput and low latency for durable queues and topics.

The SecureAnyCloud image installs Artemis 2.40.0 on OpenJDK 17 at /opt/artemis and creates a broker instance at /var/lib/artemis-broker, which runs as a dedicated artemis system user. An nginx reverse proxy on TCP 80 fronts the Hawtio web console. The broker journal, paging and bindings persist on a dedicated Azure data disk, and the first boot of every VM generates a unique web console password.

What you get:

  • Apache ActiveMQ Artemis 2.40.0 broker on OpenJDK 17 at /opt/artemis with a broker instance at /var/lib/artemis-broker
  • nginx reverse proxy on :80 in front of the Hawtio web console (bound to loopback :8161)
  • Core/OpenWire 61616, AMQP 5672, STOMP 61613 and MQTT 1883 acceptors, all bound to loopback and reachable through your own network controls
  • A dedicated Azure data disk at /var/lib/artemis holding the broker journal, paging and bindings, separate from the OS disk and re-provisioned with every VM
  • A per-VM web console password (ARTEMIS_ADMIN_PASSWORD) generated at first boot and stored in a root-only file
  • artemis.service and nginx.service as enabled, active systemd units
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2ms (2 vCPU / 8 GiB RAM) is a good starting size for the JVM broker. Scale up for higher message throughput. Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the web console. For public exposure, front the console with TLS (see Enabling HTTPS). Also allow the acceptor ports your clients use (61616 core, 5672 AMQP, 61613 STOMP, 1883 MQTT) from your application networks.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Apache ActiveMQ Artemis by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:apache-artemis-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name artemis \
  --image sac1647283583153:apache-artemis-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name artemis --port 80 --priority 1010

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

systemctl is-active artemis.service nginx.service

Both services report active. On first boot, the broker can take a minute or two to start fully while the JVM warms up.

Step 5 - Retrieve your web console password

The first boot of your VM generates a unique web console password and writes it to a root-only file. Read it as root:

sudo cat /root/artemis-credentials.txt

The ARTEMIS_ADMIN_PASSWORD value is the password. Use it to sign in to the web console as artemis.

Step 6 - Open the web console

Browse to http://<vm-public-ip>/ and sign in as artemis with the password from Step 5.

The Artemis Hawtio web console lets you browse addresses and queues, inspect message counts, and send and browse messages. It also shows broker attributes and the broker diagram.

Step 7 - Verify the broker health

The broker exposes a Jolokia REST endpoint behind the console at /console/jolokia/. Read the broker version to confirm that the broker is healthy. Replace <password> with the value from Step 5 and run the command on the VM:

PW=<password> curl -s -u artemis:$PW -H 'Origin: http://127.0.0.1' -H 'Content-Type: application/json' \
  -X POST -d '{"type":"read","mbean":"org.apache.activemq.artemis:broker=\"0.0.0.0\"","attribute":"Version"}' \
  'http://127.0.0.1/console/jolokia/'

The response is JSON with "status":200 and the broker version in value. The Jolokia endpoint requires authentication and a same-origin request, so the Origin header must match the host you are calling.

Step 8 - Send and receive a test message

Artemis ships a producer and consumer CLI in the broker instance. Send one message to a queue, then drain it. Replace <password> with the value from Step 5 and run the commands on the VM:

PW=<password>
sudo -u artemis /var/lib/artemis-broker/bin/artemis producer \
  --user artemis --password "$PW" --url tcp://127.0.0.1:61616 \
  --destination queue://DEMO --message-count 1
PW=<password>
sudo -u artemis /var/lib/artemis-broker/bin/artemis consumer \
  --user artemis --password "$PW" --url tcp://127.0.0.1:61616 \
  --destination queue://DEMO --message-count 1 --receive-timeout 10000 --break-on-null

The producer reports Produced: 1 messages and the consumer reports Consumed: 1 messages. The queue and its messages persist in the broker journal on the dedicated data disk.

Step 9 - Connect from your applications

Point JMS / core clients at tcp://<vm-public-ip>:61616, AMQP 1.0 clients at amqp://<vm-public-ip>:5672, STOMP clients at <vm-public-ip>:61613, and MQTT clients at <vm-public-ip>:1883.

The acceptors bind to loopback by default for safety. Expose only the protocols you need by publishing them through your own reverse proxy or load balancer, and open the matching NSG ports from your application networks only.

Enabling HTTPS

For production, terminate TLS at nginx with a real domain that points at the VM's public IP. Install certbot and request a certificate, replacing the domain with your own:

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.com

Backup and maintenance

The broker journal, paging, large messages and bindings live on the dedicated data disk at /var/lib/artemis. Snapshot that disk in Azure to back up your durable queues and topics. Keep the OS patched with sudo apt update && sudo apt upgrade. To restart the broker cleanly, run sudo systemctl restart artemis.

Support

SecureAnyCloud provides 24/7 support for this image. Contact us by email or chat for help with broker configuration, protocol acceptors, clustering, persistence, TLS and backups.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Deploy on Azure

Launch Apache ActiveMQ Artemis on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure