The MSMQ Network

Without going into the level of detail that an MSMQ administrator would require, I'll explain how to set up MSMQ in a network environment. You'll learn enough about how MSMQ works in a production environment to get started if you need to set up MSMQ on one or more development workstations. We'll begin with some high-level concepts and general MSMQ terminology.

An MSMQ enterprise is a set of computers that send and receive messages to and from a common set of queues. While it's possible to pass messages across enterprises, this can cause unnecessary problems. So a company should typically configure all of its computers to run within a single MSMQ enterprise.

An enterprise can be divided into MSMQ sites. A site is typically a set of computers in the same physical location. For example, a company with a single MSMQ enterprise can set up sites in London, Boston, and Los Angeles. The communication between computers in a site should be fast and inexpensive. Messages sent between sites must pass across site links. An MSMQ administrator can tune these links to optimize performance.

MSMQ also lets you assign a set of computers to a connected network (CN), a collection of computers that run the same protocol and can therefore communicate directly with one another. When a message is sent between two computers that do not belong to the same CN, the message must be routed through other computers. A computer can be a member of more than one CN. A CN is usually set up to run within a single site, but this isn't a requirement. You can create a CN that spans multiple sites.

The computers that are responsible for managing an MSMQ enterprise maintain administrative information in a distributed database known as the MSMQ Information Store (MQIS). The MQIS holds information such as a list of all the computers in the enterprise and a list of all the public queues. The MQIS is physically stored in one or more SQL Server databases. Complicated enterprises use the replication features of SQL Server to keep the information in each SQL Server database up-to-date.

The first installation of MSMQ in any enterprise must be on a computer that will serve as the primary enterprise controller (PEC). This computer must run both Windows NT Server and SQL Server. It also acts as the controller for its site. When you create another site, you should configure a second computer to act as a primary site controller (PSC). Each PSC uses a SQL Server database to hold a copy of the MQIS. To improve fault tolerance and load balancing, you can configure additional computers to act as backup site controllers (BSCs). A BSC maintains a read-only copy of the MQIS.

You can also configure a computer to run as an MSMQ routing server. A routing server can accept a message from one computer and forward it to its destination queue. You can thus pass messages between computers that aren't in the same CN. For example, if the sending computer is running only the IP protocol and the destination queue is on a computer running only the IPX protocol, the routing server can use its store-and-forward capabilities to get the message to its destination. A routing server also acts as a clearinghouse that stores messages until the computer with the destination queue comes back on line. Every PEC, PSC, and BSC acts as a routing server in addition to its other responsibilities. You can add more routing servers to the network to handle higher volumes of message traffic.

The four types of MSMQ computers that I've described so far are all examples of MSMQ servers. You can also configure a computer running MSMQ to run as an independent client or a dependent client. An independent client, like a server, can manage its own local queues. This is a good choice for remote computers because a sender application can send messages to a local queue when the user isn't connected to the network. Later, when the remote computer establishes a connection to the network, MSMQ will automatically forward the messages to their destination queue.

A dependent client can't maintain queues locally. It must be directly connected to an MSMQ server in order to send and receive messages. A computer that's always connected to MSMQ servers across a LAN is typically the only type of machine that you would run as a dependent client.

Before installing MSMQ, you should consider which version you need. One version of MSMQ is part of the Windows NT Option Pack, and the other version is part of Windows NT Server Enterprise Edition. You can use the option pack version for developing MSMQ applications in a small production environment. The version included with Windows NT Server Enterprise Edition can accommodate many more users and offers more flexibility in terms of installation and intersite routing. Consult the MSMQ documentation for more details.

Programming Distributed Applications With Com & Microsoft Visual Basic 6.0
Programming Distributed Applications with Com and Microsoft Visual Basic 6.0 (Programming/Visual Basic)
ISBN: 1572319615
EAN: 2147483647
Year: 1998
Pages: 72
Authors: Ted Pattison © 2008-2017.
If you may any questions please contact us: