active-mq

by Nimtechnology

Helm chartv1.8.2App 2.44.0Verified publisher

A Helm chart for Kubernetes

About this chart

ActiveMQ Artemis Helm Chart

This Helm chart deploys Apache ActiveMQ Artemis on Kubernetes, providing a reliable and scalable message broker.

Overview

Apache ActiveMQ Artemis is a multi-protocol, embeddable, high performance, clustered, asynchronous messaging system. This Helm chart provides a complete deployment solution for ActiveMQ Artemis on Kubernetes, including:

  • StatefulSet deployment
  • Persistent storage
  • Configuration management
  • Authentication
  • Service exposure
  • Health checks

Prerequisites

  • Kubernetes 1.16+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled)

Installing the Chart

To install the chart with the release name my-activemq:

helm install my-activemq ./active-mq

The command deploys ActiveMQ Artemis on the Kubernetes cluster with default configuration. The Parameters section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-activemq deployment:

helm delete my-activemq

Parameters

Global Settings

ParameterDescriptionDefault
nameOverrideString to partially override the release name""
fullnameOverrideString to fully override the release name""
replicaCountNumber of ActiveMQ replicas1

Image Settings

ParameterDescriptionDefault
image.repositoryActiveMQ Artemis image repositoryapache/activemq-artemis
image.tagActiveMQ Artemis image tag2.39.0
image.pullPolicyImage pull policyIfNotPresent
imagePullSecretsImage pull secrets[]

Security Settings

ParameterDescriptionDefault
serviceAccount.createIf true, create a service accounttrue
serviceAccount.automountAutomatically mount service account tokentrue
serviceAccount.annotationsAnnotations for service account{}
serviceAccount.nameService account name to use""
authentication.createIf true, create a secret for authenticationtrue
authentication.existingSecretName of existing secret to use""
authentication.defaultUsernameDefault username if not using existing secretadmin
authentication.defaultPasswordDefault password if not using existing secret"" (random)
authentication.secretKeys.usernameKey name for username in the secretACTIVEMQ_USER
authentication.secretKeys.passwordKey name for password in the secretACTIVEMQ_PASSWORD
podSecurityContext.fsGroupGroup ID (1001) corresponding to 'artemis' group in container. Required for volume permissions.1001

Pod Settings

ParameterDescriptionDefault
podAnnotationsAnnotations for pods{"prometheus.io/scrape": "true", "prometheus.io/port": "9404"}
podLabelsAdditional labels for pods{}
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity for pod assignment{}

Service Settings

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.portsService ports configurationSee values.yaml

Health Checks

ParameterDescriptionDefault
livenessProbeLiveness probe configurationSee values.yaml
readinessProbeReadiness probe configurationSee values.yaml

Storage Settings

ParameterDescriptionDefault
persistence.claimNameName of the PersistentVolumeClaimpvc-activemq-artemis
persistence.sizePVC size10Gi
persistence.storageClass.createCreate a StorageClasstrue
persistence.storageClass.nameStorageClass namegp3
persistence.storageClass.provisionerStorageClass provisionerebs.csi.aws.com
persistence.storageClass.parametersStorageClass parametersSee values.yaml
persistence.storageClass.reclaimPolicyStorageClass reclaim policyRetain
persistence.storageClass.volumeBindingModeStorageClass volume binding modeWaitForFirstConsumer

Volume Settings

ParameterDescriptionDefault
volumesAdditional volumesSee values.yaml
volumeMountsAdditional volume mountsSee values.yaml

Environment Variable Container

ParameterDescriptionDefault
envVarsEnvironment Variable for ActiveMQ ArtemisSee values.yaml
### Example:
envVars:
  JDK_JAVA_OPTIONS: -Xms512M -Xmx1G -Xlog:gc=debug:file=/tmp/gc.log

Monitoring

ParameterDescriptionDefault
monitoring.enabledEnable monitoring componentstrue
monitoring.jmx.enabledEnable JMX monitoringtrue
monitoring.jmx.exporter.imageJMX exporter imagebitnami/jmx-exporter@sha256:9cc4a173c69ec2619e1a40e5026193352abcf82c82486cd3d52529a8f14dfa52
monitoring.jmx.exporter.pullPolicyJMX exporter image pull policyIfNotPresent
monitoring.jmx.exporter.hostPortJMX host and port127.0.0.1:1098
monitoring.jmx.exporter.lowercaseOutputNameConvert output metric names to lowercasetrue
monitoring.jmx.exporter.lowercaseOutputLabelNamesConvert output label names to lowercasetrue
monitoring.jmx.exporter.resourcesResource requests and limits for JMX exporterSee values.yaml
monitoring.jmx.usernameJMX usernameenv $ARTEMIS_USER
monitoring.jmx.passwordJMX passwordenv $ARTEMIS_PASSWORD

JMX Monitoring

The chart provides JMX monitoring capabilities for ActiveMQ Artemis. JMX monitoring allows you to:

  • Monitor broker performance metrics
  • Track queue and topic statistics
  • Observe message flow and consumption rates

JMX authentication uses dedicated credentials that can be configured via values:

  • Username: Set with monitoring.jmx.username (default: env $ARTEMIS_USER)
  • Password: Set with monitoring.jmx.password (default: env $ARTEMIS_PASSWORD)

To enable JMX monitoring with customized username and password:

monitoring:
  enabled: true
  jmx:
    enabled: true
    username: "admin"  # Optional: custom JMX username
    password: "admin"  # Optional: custom JMX password
    exporter:
      resources:
        requests:
          cpu: "120m"
          memory: "500Mi"
        # limits:
        #   cpu: "200m"
        #   memory: "1Gi"

Configuration

ActiveMQ Configuration

The ActiveMQ configuration is stored in a ConfigMap and mounted to the container. The following files are included:

  • broker.xml - Main broker configuration

You can customize the broker.xml files by modifying brokerXml in values.yaml.
Example:

config:
  brokerXml:
    global-max-size: 100Mb

The above config will be custom <global-max-size>100Mb</global-max-size> inbroker.xml

Authentication

  1. Create a new secret (default behavior):
    • Set authentication.create to true
    • Username: admin (configurable via authentication.defaultUsername)
    • Password: Random 16-character string (configurable via authentication.defaultPassword)
    • Secret keys are customizable:
      • Username key: Set with authentication.secretKeys.username (default: ACTIVEMQ_USER)
      • Password key: Set with authentication.secretKeys.password (default: ACTIVEMQ_PASSWORD)
  2. Use an existing secret:
    • Set authentication.existingSecret to the name of your secret
    • Configure the key names to match your existing secret:
      • Username key: Set with authentication.secretKeys.username
      • Password key: Set with authentication.secretKeys.password
  3. No secret creation:
    • Set authentication.create to false and don't provide authentication.existingSecret
    • Default username and password to login into ActiveMQ are artemis/artemis if no authentication is configured

Persistence

The chart mounts a Persistent Volume for storing ActiveMQ data. The volume is claimed using a PersistentVolumeClaim with the name specified in persistence.claimName (defaults to pvc-activemq-artemis). The default storage size is 10Gi.

Accessing ActiveMQ

The chart exposes the following ports:

  • 61613: STOMP
  • 5672: AMQP
  • 8161: Web Console
  • 1098: RMI Registry
  • 61616: Core protocols (CORE, AMQP, STOMP, HORNETQ, MQTT, OPENWIRE)

Web Console

The ActiveMQ web console is available at port 8161. To access it from outside the cluster:

kubectl port-forward svc/my-activemq 8161:8161

Then open http://localhost:8161/console in your browser.

Prometheus Metrics

The JMX exporter exposes ActiveMQ metrics in Prometheus format on port 9404. Access these metrics with:

kubectl port-forward svc/my-activemq 9404:9404

Then open http://localhost:9404/metrics in your browser or configure your Prometheus instance to scrape this endpoint.

Metrics and Monitoring

The chart includes Prometheus annotations for scraping metrics. The metrics are exposed on port 9404 by the JMX exporter sidecar container.

When monitoring.enabled is set to true, the following annotations are added to the pod:

prometheus.io/scrape: "true"
prometheus.io/port: "9404"
prometheus.io/path: "/metrics"

This enables automatic discovery by Prometheus if your cluster has service discovery configured.

Available Metrics

The JMX exporter provides various metrics, including:

  • Queue depths
  • Message counts (enqueued, dequeued)
  • Consumer counts
  • Memory usage
  • Connection statistics
  • Broker status

JMX Configuration

The JMX configuration is stored in a ConfigMap (jmx-exporter-config) and mounted to both the ActiveMQ container and JMX exporter container. The JMX exporter uses this configuration to connect to the JMX port and expose metrics.

An init container creates the necessary JMX credentials files using the same authentication credentials as the main ActiveMQ broker. This ensures consistent authentication between broker and JMX access.

Grafana Dashboard

We also released the ActiveMQ Artemis Dashboard:

https://grafana.com/grafana/dashboards/23349

Chart Structure

active-mq/
├── Chart.yaml                 # Chart metadata
├── values.yaml                # Default configuration values
├── templates/
│   ├── _helpers.tpl           # Helper templates
│   ├── configmap.yaml         # ActiveMQ configuration
│   ├── storageclass.yml       # Storage class definition
│   ├── NOTES.txt              # Usage notes
│   ├── pvc.yaml               # Persistent volume claim
│   ├── secret.yaml            # Authentication secret
│   ├── service.yaml           # Service definition
│   ├── serviceaccount.yaml    # Service account
│   ├── statefulset.yaml       # Main ActiveMQ deployment
│   └── jmx-exporter-config.yaml    # JMX exporter configuration
└── charts/                    # Chart dependencies (if any)

Customization

To customize the chart, create a values.yaml file with your changes and use it when installing:

helm install my-activemq ./active-mq -f my-values.yaml

Troubleshooting

Checking Logs

kubectl logs -f deployment/my-activemq

Checking Pod Status

kubectl get pods -l app=my-activemq

Create Helm Package

Commands

helm package ./active-mq --destination .
helm repo index ./ --url  https://antiantiops.github.io/activemq-helm-chart

License

Apache ActiveMQ Artemis is licensed under the Apache License 2.0.

Deploy active-mq with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has active-mq on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartactive-mq is pinned at v1.8.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply