In Apache Qpid, Federation is a feature that allows messages to be routed to other brokers automatically. Suppose a business receives requests at one central location, but needs to route them to regional servers or servers in local offices, based on information contained in the message headers. Federation allows this kind of routing to be performed by configuring the brokers, with no need for programming. And the rules used for routing can be changed dynamically as servers change, responsibilities change, at different times of day, etc.
Here are some use cases for federation (taken from http://qpid.apache.org/using-broker-federation.html):
The Qpid C++ messaging broker supports broker federation, a mechanism by which large messaging networks can be built using multiple brokers. Some scenarios in which federation is useful:
- Connecting disparate locations across a wide area network. In this case full connectivity across the enterprise can be achieved while keeping local message traffic isolated to a single location.
- Departmental brokers that have a policy which controls the flow of inter-departmental message traffic.
- Scaling of capacity for expensive broker operations. High-function exchanges like the XML exchange can be replicated to scale performance.
- Co-Resident brokers Some applications benefit from having a broker co-resident with the client. This is particularly true if the client produces data that must be delivered reliably but connectivity to the consumer(s) is non-reliable. In this case, a co-resident broker provides queueing and durablilty not available in the client alone.
- Bridging disjoint IP networks. Message brokers can be configured to allow message connectivity between networks where there is no IP connectivity. For example, an isolated, private IP network can have messaging connectivity to brokers in other outside IP networks.
For details on setting up Federation, see the description of qpid-route in the Apache Qpid article, “Using Broker Federation“.