-
Notifications
You must be signed in to change notification settings - Fork 14
Bridging Guide
This page contains a step-by-step guide for connecting (bridging) two OpenDXL Brokers to one another.
-
Follow the Install OpenDXL Broker steps to create a Docker container for the first broker,
broker1
. -
Follow the installation steps again to create a Docker container for a second broker,
broker2
.
As part of the bridging setup, the default keystore which the second broker generates for itself at startup will be replaced with a new keystore which the first broker generates. This allows for each of the certificates that the brokers use to have been created from the same certificate authority.
-
Browse to the
Generate Configuration
page in the OpenDXL Broker Management Console on the first broker.A page similar to the following should be displayed:
-
Change the value in the
Configuration Type
field toBroker Keystore
. -
Specify a value for the
Common Name
field to use in the certificate for the second broker.The only required field in the form is
Common Name
which is a human readable name that can be used to identify the certificate. -
Press the
Generate
button.A zip file named
opendxlbrokerkeystore.zip
should be downloaded to a local file. -
In the
keystore
directory under the second broker's Docker Volume (/dxlbroker-volume
), delete all of the existing files. -
Extract all of the files from the
opendxlbrokerkeystore.zip
file into the second broker'skeystore
directory.
The steps below involve modifying the configuration and policy files on the two brokers to establish a bridge to one another.
-
In a text editor, open the
dxlbroker.conf.defaults
file in theconfig
directory under the first broker's/dxlbroker-volume
directory.Set the value for the
brokerId
to a unique value and save the file.For example:
brokerId=broker1
NOTE: The value that you select will be used when specifying broker bridging configuration in a later step.
-
In a text editor, open the
dxlbroker.conf.defaults
file in theconfig
directory under the second broker's/dxlbroker-volume
directory.Set the value for the
brokerId
setting to a unique value and save the file.For example:
brokerId=broker2
-
In a text editor, open the
brokerstate.policy
file in thepolicy
directory under the first broker's/dxlbroker-volume
directory.Set the contents similar to the following:
{ "hubs": [], "brokers": [ { "id": "broker1", "hostname": "10.0.0.1", "port": "8883" }, { "id": "broker2", "hostname": "10.0.0.2", "port": "58883", "parentId": "broker1" } ] }
An entry should be present in the
brokers
array for each of the two brokers.The
id
value for each broker should match thebrokerId
value from the broker'sdxlbroker.conf.defaults
file.The values for
hostname
andport
should be what the brokers use to connect to one another. These should correspond to the IP address and port which were configured for the Docker container. See the Configure Container Ports documentation for more information.The
parentId
entry for the second broker should be set to thebrokerId
value for the first broker, which, in this case, isbroker1
.For more information on the content of the
brokerstate.policy
file, see the brokerstate.policy documentation. -
Copy the
brokerstate.policy
file which was modified in the previous step to thepolicy
directory under the second broker's/dxlbroker-volume
directory. -
Restart each of the broker containers.
At this point, the two brokers should be bridged to one another.
The steps below involve sending and receiving a DXL event between the two brokers. If this process is successful, the brokers have been bridged to one another.
-
Browse to the
Fabric Monitor
page in the OpenDXL Broker Management Console on the first broker. -
Click on the
+ Add
button on theSubscriptions
tab. -
In the text box which appears under the
+ Add
button, enter/testevent
as the event topic for subscription. -
Without closing the
Fabric Monitor
page for the first broker, browse to theFabric Monitor
page in the OpenDXL Broker Management Console on the second broker. -
Under the
Send Message
tab, enter/testevent
for theTopic
andhello
for thePayload
and press theSend Message
button to send the event. -
Return to the
Fabric Monitor
page for the first broker.If the two brokers have been successfully bridged together, the
/testevent
message should have been received by the first broker and information for the message should appear on theFabric Monitor
page:
OpenDXL Broker
Configuration and Logging
- Overview (All files)
- Bridging Guide
- Configuration Files
- Policy Files
Internal Documentation
- Doxygen (Broker)
Management Console