-
Notifications
You must be signed in to change notification settings - Fork 14
brokerstate.policy
The purpose of the broker state policy file is to define how the brokers comprising a DXL fabric should connect (bridge) to each other.
It is important to note that an identical copy of this policy file must exist on each broker within the fabric for bridging to work correctly.
The format for the broker state policy file is JSON. It is also worth noting that C-style comments are allowed within the file.
The example below describes a fabric that is comprised of 5 distinct brokers. The fabric has a "root hub" (rootHub
) that is comprised of broker1
and broker2
. Two of the brokers (broker3
and broker4
) are direct spokes off of the root hub. A final broker (broker5
) connects directly to broker4
.
{
"hubs": [
{
"id": "rootHub",
"primaryBroker": "broker1",
"secondaryBroker": "broker2",
"name": "Root Hub"
}
],
"brokers": [
{
"id": "broker1",
"hostname": "broker1",
"port": "8883",
"altHostname": "192.168.1.1"
},
{
"id": "broker2",
"hostname": "broker2",
"port": "8883",
"altHostname": "192.168.1.2"
},
{
"id": "broker3",
"hostname": "broker3",
"port": "8883",
"altHostname": "192.168.1.3",
"parentId": "rootHub"
},
{
"id": "broker4",
"hostname": "broker4",
"port": "8883",
"altHostname": "192.168.1.4",
"parentId": "rootHub"
},
{
"id": "broker5",
"hostname": "broker5",
"port": "8883",
"altHostname": "192.168.1.5",
"parentId": "broker4"
}
]
}
A crude textual drawing of the fabric above is shown below:
(RootHub[broker1, broker2])
/ \
(broker3) (broker4)
|
(broker5)
The broker state policy file is comprised of two arrays (one for describing hubs
and one for describing brokers
). The fields for each of these types are detailed below.
Field | Description |
---|---|
id | A unique identifier for the hub. |
parentId | (optional) The identifier of the hub or broker for this hub to connect (bridge) to. If blank, the hub will not initiate an outgoing bridge connection (only incoming bridge connections are possible). |
primaryBroker | (optional) The identifier of a broker that is a member of this hub. |
secondaryBroker | (optional) The identifier of a broker that is a member of this hub. |
serviceZone | (optional) The name of the service zone that is established at this hub. If not specified, a service zone will not be established at this hub. |
Field | Description |
---|---|
id | The identifier associated with the broker (must match the broker identifier (brokerId ) in the dxlbroker.conf.defaults file for the corresponding broker). |
parentId | (optional) The identifier of the hub or broker for this broker to connect (bridge) to. If blank, the broker will not initiate an outgoing bridge connection (only incoming bridge connections are possible). |
hostname | The host name or IP address of the broker. |
port | The port for the broker. |
altHostname | (optional) An alternate host name or IP address of the broker. |
serviceZone | (optional) The name of the service zone that is established at this broker. If not specified, a service zone will not be established at this broker. |
OpenDXL Broker
Configuration and Logging
- Overview (All files)
- Bridging Guide
- Configuration Files
- Policy Files
Internal Documentation
- Doxygen (Broker)
Management Console