Introduction to Master / Slave

If you don't have an existing high-availability (HA) infrastructure like a storage area network (SAN), the Pure Master Slave configuration is the recommended way for providing high availability and fault tolerance for Apache ActiveMQ. The Pure Master Slave functionality is only available in the Apache ActiveMQ 4.0 release and above.

The following are the different kinds of Master/Slave configurations available:

Master Slave Type Requirements Pros Cons
Pure Master Slave None No central point of failure Requires manual restart to bring back a failed master and can only support 1 slave
Shared File System Master Slave A shared file system such as a SAN Run as many slaves as required. Automatic recovery of old masters Requires shared file system
JDBC Master Slave A Shared database Run as many slaves as required. Automatic recovery of old masters Requires a shared database. Also relatively slow as it cannot use the high performance journal

If you are using a shared network file system such as a SAN we recommend a Shared File System Master Slave. If you are happy to dispense with the high performance journal and are using pure JDBC as your persistence engine then you should use JDBC Master Slave instead.