Establish a Fully Clustered JMS Service - Set the ServerPeer ID
Set the ServerPeer ID Each node in the JMS cluster must define a unique server ID. This property is configured in the file ${JBoss_HOME}/server/${SERVER_NAME}/deploy/messaging/messaging-service.xml. Typically, the first configured server in the cluster will maintain its unique ID of 0, while the remaining nodes will each have a unique (typically one-up) server ID. For this example, we only need to modify the server ID for the node2 server by executing the following: Using the editor of choice, open the file ${JBoss_HOME}/server/node1/deploy/messaging/messaging-service.xml. Locate the following XML attribute tag (around line 20): Replace the 0 value for the ServerPeerID with the value of 1: Save and close the file. Restart both node1 and node2. Both nodes should now start without error, and you should see something similar to the following output that verifies both nodes are have joined the cluster: (node1) (node2) If you are not able to validate your JMS service is clustering properly, please validate that you have completed the previous steps before proceeding. Congratulations! You have now set up a JMS clustered service. The next step is to test your cluster against some sample JMS client code.