20.14.7. Configuring the HornetQ Servers for Replication

To configure the live and backup servers to be a replicating pair, configure the standalone-full-ha.xml files on each server to have the following settings:
<shared-store>false</shared-store>
<backup-group-name>NameOfLiveBackupPair</backup-group-name>
<check-for-live-server>true</check-for-live-server>
.
.
.
<cluster-connections>
   <cluster-connection name="my-cluster">
      ...
   </cluster-connection>
</cluster-connections>

Table 20.15. HornetQ Replicating Setup Attributes

Attribute Description
shared-store
Whether this server is using shared store or not. Default is false.
backup-group-name
This is the unique name which identifies a live/backup pair that should replicate with each other
check-for-live-server
If a replicated live server should check the current cluster to see if there is already a live server with the same node id. Default is false.
failover-on-shutdown
Whether this backup server (if it is a backup server) becomes the live server on a normal server shutdown. Default is false.
The backup server must also be flagged explicitly as a backup.
<backup>true</backup>

Table 20.16. HornetQ Backup Server Setup Attributes

Attribute Description
allow-failback
Whether this server will automatically shutdown if the original live server comes back up. Default is true.
max-saved-replicated-journal-size
The maximum number of backup journals to keep after failback occurs. Specifying this attribute is only necessary if allow-failback is true. Default value is 2, which means that after 2 failbacks the backup server must be restarted in order to be able to replicate journal from live server and become backup again.