When a broker joins a fabric as a non-managed container, it continues being a standalone broker because a Fabric Agent does not take control of the container. The agent only registers the broker with the fabric's ensemble and keeps the registry entries for it up to date. This enables consumers to discover the broker using the fabric's discovery mechanism described in Fuse Fabric Discovery Agent in Using Networks of Brokers.
Several things happen when a broker joins a fabric as a non-managed container:
The broker installs the required Fuse Fabric bundles to interact with the fabric's ensemble.
The broker contacts the specified Fabric Server and initiates the joining process.
The Fabric Server registers the container with the fabric's ensemble.
This adds the broker's information to the fabric's registry using the broker's name as the key. Because the broker is non-managed, the registry creates an entry containing information for all the message destinations hosted by the broker.
![[Warning]](imagesdb/warning.gif)
Warning If the container being added to the fabric has the same name as a container already registered with the fabric, both containers will be reset and will always share the same configuration.
The agent monitors the broker and updates the updates the ensemble's registry entry as needed.
To join a broker to a fabric a non-managed container:
Get the URL for one of the Fabric Servers in the existing fabric.
The URL of a Server has the following format:
HostName:IPPortFor example, given a fabric registry agent running on the host,
myhost, the URL would bemyhost:2181. The IP port, 2181, is the default IP port used by a Fabric Server and is usually the correct value to use. If you are in any doubt about which URL to use you can discover the URLs of the Fabric Servers as follows:Connect to the command console of one of the containers in the fabric.
Enter the following sequence of console commands:
FuseMQ:karaf@root>config:edit org.fusesource.fabric.zookeeperFuseMQ:karaf@root>config:proplistservice.pid = org.fusesource.fabric.zookeeper zookeeper.url = myhostA:2181,myhostB:2181,myhostC:2181,myhostC:2182,myhostC:2183 fabric.zookeeper.pid = org.fusesource.fabric.zookeeperFuseMQ:karaf@root>config:cancelThe
zookeeper.urlproperty holds a comma-separated list of Fabric Server URLs. You can use any one of these URLs to join the fabric.
Connect to the standalone broker's command console.
Enter the following command:
FuseMQ:karaf@root>fabric:join -nfabricURLbrokerNameYou need to provide values for:
-n—specifies that the broker will not be managed by the fabricfabricURL—the Fabric Server URL you obtained in Step 1brokerName—the name the broker will use to register with the fabric![[Important]](imagesdb/important.gif)
Important The name should be unique among the containers in the fabric.
For details on fabric:join see fabric:join in Console Reference.








