Non HA stores starting from schema version 4 (0.14 Qpid release) can be automatically converted into HA store on broker startup if replication is first enabled with the
DbEnableReplication utility from the BDB JE jar.
DbEnableReplication converts a non HA store into an HA store and can be used as follows:
Example 13.7. Enabling replication
In the examples above, je jar of version 5.0.73 is used to convert store at /path/to/store into HA store having replication group name MyReplicationGroup, node name MyNode1 and running on host localhost and port 5001.
After running DbEnableReplication and updating the virtual host store to configuration to be an HA message store, like in example below, on broker start up the store schema will be upgraded to the most recent version and the broker can be used as normal.
Example 13.8. Example of XML configuration for HA message store
<store> <class>org.apache.qpid.server.store.berkeleydb.BDBHAMessageStore</class> <environment-path>/path/to/store</environment-path> <highAvailability> <groupName>MyReplicationGroup</groupName> <nodeName>MyNode1</nodeName> <nodeHostPort>localhost:5001</nodeHostPort> <helperHostPort>localhost:5001</helperHostPort> </highAvailability> </store>
The Replica nodes can be started with empty stores. The data will be automatically copied from Master to Replica on Replica start-up. This will take a period of time determined by the size of the Masters store and the network bandwidth between the nodes.
Due to existing caveats in Berkeley JE with copying of data from Master into Replica it is recommended to restart the Master node after store schema upgrade is finished before starting the Replica nodes.
Apache Qpid, Messaging built on AMQP; Copyright © 2013 The Apache Software Foundation; Licensed under the Apache License, Version 2.0; Apache Qpid, Qpid, Qpid Proton, Proton, Apache, the Apache feather logo, and the Apache Qpid project logo are trademarks of The Apache Software Foundation; All other marks mentioned may be trademarks or registered trademarks of their respective owners