Currently only an upstream can be configured for federation. For flexibility we should also be able to configure downstream federated brokers. This would be especially beneficial in scenarios such as a wheel/spoke topology where the central broker could have all of the upstream/downstream configurations to make it easy and keep it in the same place.
This feature piggy backs on the existing upstream framework. When a downstream is configured a message is sent to the other broker on connect and that remote broker will parse the message and use the information to create an upstream connection back to the originating broker. If the downstream connection disconnects or is closed it will terminate the upstream connection. There will be a flag to share downstream/upstream connections to the same broker.
The downstream configuration can be configured to use HA just like upstreams so that if it terminates because the remote broker goes down it can failover to another. The resulting upstream connection that is created back to the original broker that sent the downstream packet will just be a direct connection back and doesn't need HA because the downstream manages it on its side.
See the documentation and examples for more info on how this will work.