ActiveMQ Installation

Install ActiveMQ on a Dedicated Server

Procedure

  1. On the server on which you want to install ActiveMQ, install one of the following:
    • OpenJDK V11
      1. Download OpenJDK 11 (LTS) from the https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot.

        The OpenJDK 11 installer is downloaded to your local drive.

      2. Run the OpenJDK 11 installer and follow the instructions in the wizard.
      3. In the Custom Setup page, select the Set JAVA_HOME variable menu, and then select Will be installed on local hard drive.
      4. When the installation is complete, close the OpenJDK 11 installer.
    • Oracle JDK V11
      1. Download and install Oracle JDK V11.
      2. 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.
  2. 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.
  3. Extract the contents of the zip file to C:\Program Files\ActiveMQ.
  4. Go to C:\Program Files\ActiveMQ\apache-activemq-5.15.11\conf, and then access the activemq.xml file.
  5. In the activemq.xml file, perform the following actions:
    1. Locate the <broker> tag, and then add the attribute schedulerSupport="true" and schedulePeriodForDestinationPurge="10000" to the tag.
    2. Locate the <transportConnectors> tag and comment out the ones with names amqp, stomp, mqtt, and ws.
    3. Locate the <policyEntries> tag.
      • If a <policyEntry> tag exists with the attribute queue=">", 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>.
  6. Save and close the .xml file.
  7. Access the jetty-realm.properties file.
  8. In the properties file, change the admin password:admin: <password>, admin
  9. Comment out the other account.
  10. Save and close the properties file.
  11. In the wrapper.conf file, perform the following actions.
    1. Locate the text - wrapper.java.maxmemory=1024
    2. Change the value 1024 to the minimum value of 4000. You can increase the value if you perform heavy data loads.
  12. Save and close the wrapper.conf file.
  13. Select the Start button on Windows, right-click Command Prompt, and then select Run as administrator.
    The Command Prompt window appears.
  14. Enter cd C:\Program Files\ActiveMQ\apache-activemq-5.15.11\bin\win64, and then press Enter.
  15. Enter InstallService.bat, and then press Enter.
    ActiveMQ is installed.
  16. 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.
  17. On the server on which ActiveMQ is installed, go to http://localhost:8161/ in a web browser, and ensure that ActiveMQ runs successfully.

  18. On the APM server, go to C:\ProgramData\Meridium\appSettings.Global.json.
  19. 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
    
  20. 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.

What To Do Next