简介
Apache ActiveMQ is an open-source message broker written in Java. It supports several cross-language clients and protocols.
The Apache ActiveMQ message broker is a fast, reliable, scalable, and totally integrated open source messaging platform for handling lots of messages (ingest) or lots of consumers (dispatch). It uses memory as the storage format; it can be configured to store data persistently on a disk if necessary. The initial startup time can be slow due to the fact that ActiveMQ will load all historical information into memory. However, after the first startup period, which could take up to several minutes depending on how much history you have stored in your queues and other configuration settings, performance starts to scale well up until a point when we consider other factors such as system resources.
Based on its origins as an experience of just moving from an in-house messaging solution to a commercial product, ActiveMQ can be considered as one of those products that have been constantly developed and improved, offering extremely high quality and solid stability.
ActiveMQ provides both a simple embedded broker and a fully deployed, highly available enterprise solution. Its most important features and strengths are high availability and failover (a setup with one broker can survive up to 99.999% of message loss), support for many ways of connecting clients (including web consoles, command-line tools, and libraries, JMS client libraries, etc.), clustering across physical boundaries, load balancing through multiple internal queues per topic, flexible configuration such as persistent or non-persistent messages according to the need, the persistence of data by file or database, security implementation based on JAAS authentication model which also supports LDAP implementation.
ActiveMQ is truly the preferred messaging solution for Java developers, infrastructure architects, and system integrators. It can be used in both small deployments (in which case you will probably use the embedded broker) or big enterprise solutions (which require clustering and failover).
Depending on your needs, ActiveMQ can be easily scaled out to real high availability scenarios with full load balancing across all brokers, including dynamic addition of new nodes when existing ones go down; stateful failover with automatic re-sync and potential data loss (which is always possible), fully supported by ActiveMQ itself: just another two nodes that need to be configured into a cluster for high availability.
Apache ActiveMQ is cross-platform and runs in a Java Virtual Machine (JVM). You could use ActiveMQ on either Linux, Windows, or OS X.
安装
Ubuntu系统
环境配置
- 规格:4C8G,100G数据盘
- 系统:20.04.3 LTS (GNU/Linux 5.4.0-107-generic x86_64)
- PostgreSQL版本:PostgreSQL 9.5.25
Pre-Installation Requirements
Hardware:
- 60 MB of free disk space for the ActiveMQ binary distribution.
- 200 MB of free disk space for the ActiveMQ source or developer’s distributions.
Operating Systems:
- Windows: Windows XP SP2, Windows 2000.
- Unix: Ubuntu Linux, Powerdog Linux, MacOS, AIX, HP-UX, Solaris, or any Unix platform that supports Java.
Environment:
- Java Developer Kit (JDK) 1.7.x or greater for deployment and 1.7.x (Java 7) for compiling/building.
- The JAVA_HOME environment variable must be set to the directory where the JDK is installed, e.g.,
c:\Program Files\jdk.1.7.0_xx_xx
.- Maven 3.0 or greater (required when installing source or developer’s releases).
- JARs that will be used must be added to the classpath.
安装流程
1 | 安装基础依赖包 |