Apache ActiveMQ is a free and open source messaging and integration pattern server. It is most widely used in enterprise software developement and some of its features are listed below.
Supports a variety of Cross Language Clients and Protocols from Java, C, C++, C#, Ruby, Perl, Python, PHP
OpenWire for high performance clients in Java, C, C++, C#
MQTT v3.1 support allowing for connections in an IoT environment.
Full support for the Enterprise Integration Patterns both in the JMS client and the Message Broker
Fully supports JMS 1.1 and J2EE 1.4 with support for transient, persistent, transactional and XA messaging
Spring Support so that ActiveMQ can be easily embedded into Spring applications and configured using Spring's XML configuration mechanism.
A CentOS 7 Server
A root user
Java 7 or greater
It is highly recommended to update your system and upgrade all available packages before going through the installation process so run below given command it will do the job for you.
yum -y update
Install OpenJDK JRE 8
Once the system is updated you'll have to install OpenJDK JRE 8 because Apache ActiveMQ requires java 7 or greater so let's install java using below given command.
yum install -y java-1.8.0-openjdk
Next check java version and verify the installation result. java -version You should see following output as result.
[root@Sajid ~]# java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
Next you'll have to setup java home environment variable.
echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profilesource /etc/profile
Installing Apache ActiveMQ
We have installed all the required dependencies now we can proceed to install Apache ActiveMQ so first download the latest stable release of Apache ActiveMQ and to do so run below given command it'll do the job for you.
If in case you don't have wget package already installed on your system then you can install it using yum -y install wget
Let's start the apache activemq services and we will also have to modify firewalld rules.
systemctl start activemq.service
Next you’ll have to modify firewall rules and if in case you don’t have firewalld services installed on your server then you can install it using yum -y install firewalld and you can start it using systemctl start firewalld
Next run these below given command to modify the firewalld rules and allow access to port 8161.
Open your favorite web browser and visit http://yourserverIP:8161/admin and you'll see a login page use admin as both username and password for login after successfully login you'll see a web page like this.
The username and password can be configured in the /opt/activemq/conf/jetty-real.properties file.
Monitoring ActiveMQ With ActiveMQ Monitor (AMon)
AMon is a highly configurable and extensible enterprise-class monitoring framework for the Apache ActiveMQ message broker. AMon gives systems administrators and managers the ability to monitor the overall health and performance of the ActiveMQ message broker. Some benefits of AMon are listed below.
SNMP Support: Allows you to monitor ActiveMQ via the SNMPv2 protocol.
Quick and Customizable: Quickly develop custom monitoring agents (Monlets) for the ActiveMQ message broker without having to change the core ActiveMQ product.
Apache Camel: Monlets are deployed as Camel Routes and can thus leverage the power of the Camel integration framework.
Metrics and Performance Data: Monlets can be customized to provide performance data that can be used by operators for observation of system performance.
Logging: AMon provides the ability to easily transform selected broker log messages into SNMP notifications.
JVM Monitoring: AMon allows Monlets to monitor conditions associated with the broker's hosting Java Virtual Machine (JVM).
To install ActiveMQ Monitor first we will have to download the gzip archive file copy it to your machine.
Next extract the files from the archive file that we have just downloaded into the ACTIVEMQ_HOME directory.
After that obtain a permanent lifetime license and place the file in the ACTIVEMQ_HOME/conf directory using any text editor.
In this tutorial you have learned how to install Apache ActiveMQ on your CentOS 7 server and you also got to know about how to monitor ActiveMQ using AMon.
Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.
HostPresto will be launching a European point of presence in the coming weeks, specifically in Amsterdam. For customers needing their data located within the EU still please contact support to request migration to this location with ticket subject ‘EU Migration’. We will ensure this is actioned well before the Brexit...
Should the UK leave the EU without a deal, or should a deal be agreed that does not include a provision for .eu ownership by UK entities, it’s highly likely that the EU will revoke any .eu domain names unless you can provide an EU address. While this won’t happen...
If you own a .co.uk domain name and you have not registered the equivalent .uk version, you have until the 25th June 2019 to register the domain and secure your brand. After this date any unregistered .uk domain will enter public availability – meaning anyone can register the domain. You...