Menu Search

10.3. Creating a group

This section describes how to create a group. At a high level, creating a group involves first creating the first node standalone, then creating subsequent nodes referencing the first node so the nodes can introduce themselves and gradually the group is built up.

A group is created through either Web Management or the REST API. These instructions presume you are using Web Management. To illustrate the example it builds the group illustrated in figure Figure 10.1, “3-node group deployed across three Brokers.”

  1. Install a Broker on each machine that will be used to host the group. As messaging clients will need to be able to connect to and authentication to all Brokers, it usually makes sense to choose a common authentication mechanism e.g. Simple LDAP Authentication, External with SSL client authentication or Kerberos.

  2. Select one Broker instance to host the first node instance. This choice is an arbitrary one. The node is special only whilst creating group. Once creation is complete, all nodes will be considered equal.

  3. Click the Add button on the Virtualhost Panel on the Broker tab.

    1. Give the Virtualhost node a unique name e.g. weather1. The name must be unique within the group and unique to that Broker. It is best if the node names are chosen from a different nomenclature than the machine names themselves.

    2. Choose BDB_HA and select New group

    3. Give the group a name e.g. weather. The group name must be unique and will be the name also given to the virtualhost, so this is the name the messaging clients will use in their connection url.

    4. Give the address of this node. This is an address on this node's host that will be used for replication purposes. The hostname must be resolvable by all the other nodes in the group. This is separate from the address used by messaging clients to connect to the Broker. It is usually best to choose a symbolic name, rather than an IP address.

    5. Now add the node addresses of all the other nodes that will form the group. In our example we are building a three node group so we give the node addresses of chaac:5000 and indra:5000.

    6. Click Add to create the node. The virtualhost node will be created with the virtualhost. As there is only one node at this stage, the role will be master.

    Figure 10.2. Creating 1st node in a group

    Creating 1st node in a group

  4. Now move to the second Broker to be the group. Click the Add button on the Virtualhost Panel on the Broker tab of the second Broker.

    1. Give the Virtualhost node a unique name e.g. weather2.

    2. Choose BDB_HA and choose Existing group

    3. Give the details of the existing node. Following our example, specify weather, weather1 and thor:5000

    4. Give the address of this node.

    5. Click Add to create the node. The node will use the existing details to contact it and introduce itself into the group. At this stage, the group will have two nodes, with the second node in the replica role.

    6. Repeat these steps until you have added all the nodes to the group.

    Figure 10.3. Adding subsequent nodes to the group

    Adding subsequent nodes to the group

The group is now formed and is ready for us. Looking at the virtualhost node of any of the nodes shows a complete view of the whole group.

Figure 10.4. View of group from one node

View of group from one node