Introducing Message Queuing

Message Queuing (formerly named MSMQ) is Microsoft's foray into the world of messaging services. Message Queuing first made its appearance as an add-on in an option pack for Windows NT. Message Queuing 2.0, which added support for Active Directory, made its debut with Windows 2000; Windows XP introduced a largely similar Message Queuing 3.0, which includes the added ability to easily send a message to a queue over the Internet in a SOAP package and to forward messages to multiple recipients.

As with all optional Windows components, before you attempt to use Message Queuing, verify that you have it installed by opening the Add/Remove Windows Components dialog box. As a rule, I try to avoid discussing software setup for Microsoft servers and components in this book because in most large-scale systems, dedicated system administrators will work with developers to create the required environment. However, a brief discussion of Message Queuing installation is important because it is a common source of confusion.

Essentially, you can install Message Queuing in three "modes," as described in the following sections.

Note

The MSDN Reference includes information about Message Queuing, but it might not be tailored to the version you're using. For information about setup and configuration, refer to the Message Queuing branch of the Microsoft Management Console (MMC) for help. You can find this information if you press F1 after selecting a queue in Computer Manager.


Message Queuing Server

A Message Queuing server is a dedicated computer that hosts the message queues for your application. A Message Queuing server can be created only on a Windows 2000 Server, Windows 2000 Advanced Server, or Windows .NET Server. Ultimately, you will want to use a Message Queuing server to centralize the queues used in your system so they can be accessed, administered, secured, and protected from a single point.

Ideally, your Message Queuing server will also have Active Directory installed. This provides at least two key benefits:

  • You can use public queues.

    That means clients can search for a queue. Otherwise, they must locate the queue using the correct queue and server name and if you move a queue to another machine, the client application needs to be modified.

  • You can secure your queue with an access control list (ACL).

    Queue authentication is quite fine-grained and can prevent users from reading from, sending to, or configuring a specific queue.

Dependent Client

If you have configured a Message Queuing server, you can also create a dependent client. The dependent client can't work in a disconnected environment because it does not have a message store. Instead, it forwards all messages directly to the server (using a special proxy mechanism that's built into Windows). Dependent clients are useful if you want to ensure that messages can't be sent if the server isn't online. Dependent clients are generally less robust and less common than independent clients because they can't weather network problems.

You can configure any Windows 2000 or Windows XP computer to be a dependent client. However, the Message Queuing server and Windows 2000 domain controller must exist before you install the Message Queuing components on the client.

Independent Client

Independent clients can send messages while being connected to a server or without a connection, in which case the message is stored locally until the connection returns. This is a particularly useful trick for laptop users because it enables them to perform work while disconnected and automatically forwards all the appropriate messages when they connect later. This mode of operation is supported by Windows 2000 and Windows XP (but not the server versions) and is also a likely candidate for development testing.

Multiple independent clients can send messages to each other's queues in a workgroup environment, provided they know the computer name and queue name. However, they forgo the ability to look up queues or enforce any type of Windows 2000 queue authentication.



Microsoft. NET Distributed Applications(c) Integrating XML Web Services and. NET Remoting
MicrosoftВ® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting (Pro-Developer)
ISBN: 0735619336
EAN: 2147483647
Year: 2005
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net