Preparing ActiveMQ Artemis messaging container
These procedures are intended for users with Docker knowledge. We do not provide Docker support, just provide guidelines on how to use it with our product. For more information about Docker, see https://docs.docker.com/
ActiveMQ Artemis is used for asynchronous messaging.
Preparing an ActiveMQ Artemis image
Please check the correct component version in the Third-Party Component Compatibility page and edit the ActiveMQ Artemis version in the configuration files.
To build an ActiveMQ Artemis image
- Ceate the following files :
- messaging/docker-compose.yml
services: messaging: build: . image: apache/activemq-artemis:2.41.0-alpine container_name: messaging mem_limit: 2g ports: - "61616:61616" # Core Messaging Port - "8161:8161" # Management Console (Artemis Web UI) environment: - ARTEMIS_USER=artemis - ARTEMIS_PASSWORD=artemis # EXTRA_ARGS allows the web console to be accessed from outside the container - EXTRA_ARGS=--http-host 0.0.0.0 --relax-jolokia # volumes: # Persists all configurations and message queues to your host # - ./data/messaging:/var/lib/artemis-instance healthcheck: test: ["CMD", "nc", "-z", "localhost", "61616"] interval: 10s timeout: 5s retries: 5 start_period: 30s networks: - twc-net networks: twc-net: external: trueSHELL - messaging/dockerfile
# Use the specific official 2.41.0 alpine image FROM apache/activemq-artemis:2.41.0-alpine # These env vars match your WebApp configuration ENV ARTEMIS_USER=artemis ENV ARTEMIS_PASSWORD=artemis # Optional: Add extra arguments for the broker ENV EXTRA_ARGS="--http-host 0.0.0.0 --relax-jolokia" # Ensure the container runs as the artemis user for security USER artemisSHELL
- messaging/docker-compose.yml
- Build the image by running the following command:
cd twc/messaging; docker compose build --no-cacheSHELL - Start the messaging Docker:
docker compose up -dSHELL
Stopping Service:
1. To stop the running service , navigate to service directory and run
cd messaging;
docker compose down
SHELL