Configuring and deploying a master/slave broker with Apache Karaf
In this recipe, we will set up and deploy two Karaf instances with embedded ActiveMQ in a master/slave configuration. This is used for high availability in messaging systems. This will allow systems to continue functioning in case of a failure of the active instance.
Getting ready
First we need to get two instances of Karaf started up with an embedded broker. If we are doing this on two different machines, it is actually easier since we will not have port conflicts when using the defaults on both machines. Keep in mind that if you decide to run this deployment on a single machine, one of the instances of Jetty and ActiveMQ embedded in Karaf needs to have its ports changed.
How to do ...
Get Apache Karaf Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.