ActiveMQ Installation
Install ActiveMQ on a Dedicated Server
Procedure
- On the server on which you want to install ActiveMQ, install one of the following:
- OpenJDK V11
- Download OpenJDK 11 (LTS) from the AdoptOpenJDK website.
The OpenJDK 11 installer is downloaded to your local drive.
- Run the OpenJDK 11 installer and follow the instructions in the wizard.
- In the Custom Setup page, select the Set JAVA_HOME variable menu, and then select Will be installed on local hard drive.
- When the installation is complete, close the OpenJDK 11 installer.
- Download OpenJDK 11 (LTS) from the AdoptOpenJDK website.
- Oracle JDK V11
- Download and install Oracle JDK V11.
- Configure the JAVA_HOME environment variable to point Elasticsearch to the Java installation directory, and then add Java to the Path system variable.Note: For more information on how to configure the JAVA_HOME environment variable, refer to the Oracle documentation.
- OpenJDK V11
- Download the zip file for Windows, apache-activemq-5.xxx.zip, (where xxx is the latest minor version of ActiveMQ 5), from the official ActiveMQ https://activemq.apache.org/components/classic/download/ page.
- Extract the contents of the zip file to C:\Program Files\ActiveMQ.
- Go to C:\Program Files\ActiveMQ\apache-activemq-5.15.11\conf, and then access the activemq.xml file.
- In the activemq.xml file, perform the following actions:
- Locate the
<broker>
tag, and then add the attributeschedulerSupport="true"
andschedulePeriodForDestinationPurge="10000"
to the tag. - Locate the
<transportConnectors>
tag and comment out the ones with names amqp, stomp, mqtt, and ws. - Locate the
<policyEntries>
tag.- If a
<policyEntry>
tag exists with the attributequeue=">"
, modify the tag to match the following:<policyEntry queue=">" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000"> <deadLetterStrategy> <sharedDeadLetterStrategy processExpired="false" /> </deadLetterStrategy> </policyEntry>
. - If the
<policyEntry>
tag does not exist, add the following:<policyEntry queue=">" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000"> <deadLetterStrategy> <sharedDeadLetterStrategy processExpired="false" /> </deadLetterStrategy> </policyEntry>
.
- If a
- Locate the
- Save and close the .xml file.
- Access the jetty-realm.properties file.
- In the properties file, change the admin password:admin: <password>, admin
- Comment out the other account.
- Save and close the properties file.
- In the wrapper.conf file, perform the following actions.
- Locate the text - wrapper.java.maxmemory=1024
- Change the value 1024 to the minimum value of 4000. You can increase the value if you perform heavy data loads.
- Save and close the wrapper.conf file.
- Select the Start button on Windows, right-click Command Prompt, and then select Run as administrator.The Command Prompt window appears.
- Enter cd C:\Program Files\ActiveMQ\apache-activemq-5.15.11\bin\win64, and then press Enter.
- Enter InstallService.bat, and then press Enter.ActiveMQ is installed.
- Access the Microsoft Management Console (services.msc) and perform the following operations for the ActiveMQ service:
- Verify that the service runs as Local System.
- Modify the startup to be Automatic.
- Start the service to verify installation and configuration.
- On the server on which ActiveMQ is installed, go to http://localhost:8161/ in a web browser, and ensure that ActiveMQ runs successfully.
- On the APM server, go to C:\ProgramData\Meridium\appSettings.Global.json.
- As needed, modify the following values. If ActiveMQ is configured to be a cluster, add the additional host under “failoverHosts”:
// Connection settings for ActiveMQ "queueOptions": { "activeMqHost": "localhost", "activeMqPort": 6161, "failoverHosts": [ "localhost" ], "username": "admin", "password": "admin
- After all third-party services are configured, reset IIS and services on all APM App Servers.Important: Verify that the hostnames and ports are configured correctly. If the hostname is not set correctly, then the third-party library that APM uses to connect to ActiveMQ starts logging errors in a log file. The size of the log files can reach up to 400GB in 24 hours. It is recommended to check the log files folder after starting APM for the first time.