1.3.3 Inter-Site Routing
Administrators can model the physical topology of an enterprise as properties in the directory. The Message Queuing (MSMQ): Binary Reliable Message Routing Algorithm uses this model to make routing decisions.
MSMQ sites represent a grouping of MSMQ queue managers in the enterprise network according to physical location. MSMQ queue managers in one MSMQ site use MSMQ site gates within the same MSMQ site to route messages to MSMQ queue managers in other MSMQ sites. An MSMQ site gate can route a message to another MSMQ site by sending that message to another MSMQ site gate.
Routing inter-site traffic only through MSMQ site gates often results in session concentration, which can reduce network bandwidth consumption between physically distant nodes.
If an enterprise network has more than one MSMQ site, an administrator creates MSMQ routing links to allow messages to be routed between those MSMQ sites. MSMQ routing links identify neighboring MSMQ sites whose MSMQ site gates can communicate directly. Each MSMQ routing link includes a routing link cost that represents how expensive it is to transfer messages directly between the two sites.
A message can be transferred through multiple MSMQ sites on the way to the destination MSMQ site. Each MSMQ site gate along the way uses a routing table to find the next hop in a least-cost path to the destination MSMQ site.
To build the routing table, MSMQ site gates consider the enterprise as a graph with vertices as MSMQ sites and bidirectional nonnegative edge weights as the routing link costs. An MSMQ site gate builds a least-cost spanning tree using its MSMQ site as the root and uses this tree to populate its routing table.

Figure 1: Enterprise as a set of MSMQ sites and MSMQ routing links
Routing link cost provides a mechanism for administrators to enforce one route over another in cases where multiple routes exist.
As described in section 3.1.6.1, each MSMQ queue manager that runs MSMQ within an enterprise periodically queries the directory to determine whether it acts as an MSMQ site gate, and to build a routing table if the querying MSMQ queue manager is an MSMQ site gate.