2.1.3.3 Message Queuing and Directory Service

The Microsoft Message Queuing (MSMQ) protocol set optionally supports a Directory Service to enable a set of features pertaining to message security, efficient routing, and the publishing of queues, distribution lists, and queue aliases. The directory provides the MSMQ protocol set with global storage and an access mechanism for shared metadata.

The MSMQ protocol set supports two predefined modes in terms of Directory Service integration: Workgroup mode or Directory-Integrated mode.

Workgroup mode: In this mode, MSMQ protocol set implementations do not use the Directory Service and are limited to private queues using direct format name addressing.

Directory-Integrated mode: In this mode, MSMQ protocol set implementations interact with the Directory Service for publishing and accessing public queue metadata, network topology information, and certificate and encryption metadata. In this mode, all queue managers participating in the implementation are located on machines that are domain-joined.

Message Queuing in Directory-Integrated mode

Figure 12: Message Queuing in Directory-Integrated mode

The Directory Service and its function within the MSMQ protocol set are described in more detail in [MS-MQDS] sections 1.3 and 3 and in [MC-MQAC] section 1.4. Versions 1.0 and 2.0 of MSMQ implement their own Directory Service through the MQDS protocol. Subsequent versions of MSMQ use Active Directory as the Directory Service through the Lightweight Directory Access Protocol (LDAP)

Directory-Integrated mode with routing: The MSMQ protocol set supports least-cost routing of messages within a computer network. This provision is particularly useful in complex network topologies--for example, MSMQ computers belong to different administrative regions. This configuration is accomplished by deploying an MSMQ protocol set implementation in Directory-Integrated mode with routing enabled. In this mode, the MSMQ implementation retrieves the network topology information from the Directory Service and uses this information for routing messages from one queue manager to another. If a direct connection to the final destination queue manager is not possible, the source queue manager makes use of interim special queue managers known as routing servers, which can efficiently route messages to the next hop.

An overview of this type of deployment is described in [MS-MQBR] section 1.3. The following diagram illustrates a typical deployment with routing servers across a complex network topology.

Enterprise deployment of MSMQ with routing

Figure 13: Enterprise deployment of MSMQ with routing

The preceding figure illustrates MSMQ deployment in an enterprise environment over a complex deployment topology. The MSMQ routing functionality allows applications deployed on one part of the enterprise network to communicate with remote applications deployed on another part of the enterprise in such a way that, although there is no direct network connectivity between these two applications, MSMQ can use interim routing servers to transfer messages between the applications in a reliable way.

An MSMQ site is a network of computers, typically physically collocated, that have high connectivity as measured in terms of latency (low) and throughput (high).

An MSMQ routing link is a communication link between two MSMQ sites.

A routing server is a queue manager role that enables Store-and-Forward messaging between computers within an MSMQ site.

An MSMQ site gateis a routing server that bridges two or more MSMQ sites such that all intersite messaging traffic flows through MSMQ site gates.

In an enterprise multisite deployment as shown in the previous illustration, a message flows in the following manner:

  • The sender application sends the message to a source queue manager.

  • The queue manager transfers this message to a routing server in the same MSMQ site.

  • The routing server transfers the message to an MSMQ site gate.

  • The source MSMQ site gate transfers the message to the destination MSMQ site gate through the MSMQ routing link.

  • The destination site gate transfers the message to the destination queue manager, optionally through one or more routing servers.

  • The destination queue manager places the message in the destination queue.

Because both site gates and routing servers are queue managers themselves, applications can also use them as queue managers. This functionality is illustrated in the preceding figure through dotted association lines.

The routing server algorithm as specified in [MS-MQBR] section 3.1 is used to determine the least-cost message route between the source and destination queue managers.