This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
The Microsoft Message Queue
|
687
application
Communications with MSMQ
The basis of communications for MSMQ is the Active Directory site; thus, all mes-
sage exchange between queues and applications is done within the context of your
organization’s Active Directory structure. MSMQ is a very chatty service and it uses a
lot of network bandwidth, so make sure you place at least one MSMQ server in each
Active Directory site or subnet to mitigate that effect. For traffic between sites,
MSMQ uses routing links, which use the TCP/IP protocol to pass traffic to and from
hosts.
Where direct connections cannot be established, the MSMQ software routes mes-
sages according to rules dictating how messages should be transmitted. Messages
that are routed move from station to station—or “hop” to “hop,” as it is formally
known—until the destination is reached. MSMQ attempts to route messages along
the least costly route, where the cost is derived from the available bandwidth divided
by the actual currency cost of the connection. (This requires outside math on your
part.) You specify the cost of the link, similar to how you specify the cost of an AD
site link, to MSMQ, and it takes that into account when routing messages between
MSMQ servers.
MSMQ Administration
Although much MSMQ detail is beyond the scope of this book, a lot of administra-
tors find themselves administering MSMQ at least in part. With that in mind, the
next section details some very common administrative tasks you can perform with
the MSMQ. For a more detailed approach to MSMQ development and administra-
tion, consult a book or online resource dedicated to the topic. (I’ve listed one at the
end of this section.)
Installing MSMQ
You can easily install MSMQ from the Add/Remove Programs tool within the Con-
trol Panel. Open the tool and then select Add/Remove Windows Components from
the left pane. Select Application Server, and then click the Details button. Finally,
check the checkbox next to Message Queuing, and click OK and then Next to install
the components.
Some tips for best performance of MSMQ servers and links:
If you have multiple Active Directory sites in your forest, try to install MSMQ on
at least one server in every site. This way, messages will be more reliably deliv-
ered to their destinations between sites, and client broadcast requests will be
acknowledged more efficiently.
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
688
|
Chapter 13: Other Windows Server 2003 Services
Try to install MSMQ on a Windows domain controller that is functioning as a
global catalog server. This improves performance. In fact, installing MSMQ on
multiple domain controllers will improve performance further.
However, if you choose to install MSMQ on a domain controller, avoid install-
ing it with routing enabled.
MSMQ automatically will take on the identity of the site into which
it’s installed.
Finding an MSMQ server
To find a machine that is running the MSMQ software, open Active Directory Users
and Computers, and then do the following:
1. From the View menu, select Users, Groups, and Computers as containers.
2. Again from the View menu, select Advanced Features.
3. In the left pane, select the relevant domain, and then expand the node and select
Computers. Alternatively, select Domain Controllers if you have MSMQ installed
on your domain controllers, as described earlier.
4. In the right pane, click each computer. Look for the MSMQ folder on each.
Setting a maximum message size
You might want to set a maximum message size for a particular system to compen-
sate for disk space restraints or bandwidth concerns. To do so, take these steps:
1. Open Active Directory Users and Computers.
2. From the View menu, select Users, Groups, and Computers as containers.
3. Again from the View menu, select Advanced Features.
4. In the left pane, right-click MSMQ and choose Properties from the context menu.
5. Navigate to the General tab.
6. Under Storage limits, check the Limit message storage to (KB) option.
7. Enter a value, in kilobytes, that represents the maximum message size this sys-
tem will accept.
8. Click OK to finish.
Enabling and disabling journals
Recall that journals are simply copies of messages to track their history. To enable or
disable journals, follow these steps:
1. Open Active Directory Users and Computers.
2. From the View menu, select Users, Groups, and Computers as containers.

Get Learning Windows Server 2003, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.