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.
HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/499986373.png" alt=" " />
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.
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...