Book Image

WildFly Cookbook

Book Image

WildFly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Clustering HornetQ using a shared store


In this recipe, you will learn how to configure HornetQ to provide clustering features by configuring to WildFly instances; one acting as a Live HornetQ server, the other one acting as a Backup HornetQ server.

The overall configuration can be represented as seen in the following image:

Shared store configuration

Within the recipe, we will use a local shared store by giving each live and backup server pair the same data directory. This kind of configuration can also be very useful in both development and test environments to easily simulate high availability and failover capabilities.

In a production environment, you should provide high availability by having more pairs of live and backup servers, and use a proper filesystem as depicted in the following image:

Shared store configuration with high-availability

Getting ready

To get started, let's first create two adhoc folders to run our WildFly.

  1. In a terminal window, run the following commands:

    $ cd $WILDFLY_HOME...