Make your own free website on Tripod.com
 

Microsoft Message Queue Server (MSMQ)

Gopalan Suresh Raj

 
   
   
   
   
   
   
   
   
A simple MSMQ Server application
A simple MSMQ Client Sink
   
  Asynchronous Message Queuing using .NET & COM+
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

 

The Microsoft Message Queue Server, code named the Falcon is a Message Oriented Middleware that was designed with just one purpose in mind - fast, reliable asynchronous electronic communication. It also ensures guaranteed message delivery, receipt notification and transaction control.

What is a message?

A message is a unit of information or data that is sent from a process running on one computer to other processes running on the same or different computers on the network.

Message Oriented Middleware (MOM for short), reduce the complexity involved in developing applications that span multiple operating systems and networking protocols by insulating the application developer from the details of the various operating systems and network interfaces by providing APIs that extend across diverse platforms and networks. MOMs increase the flexibility of an architecture by enabling applications to exchange messages with other programs without having to know what platform or processor the other application resides on within the network.

When and where do we need MSMQ?

ORB's functionality Store and Forward Communication: MSMQ enables applications to send requests to other applications - on the same or a different network - that are not expected to be running or reachable at the same time.
ORB's functionality Defensive Communication: In environments connected by LANs, applications are protected by MSMQ against communication losses when the network fails, be tolerant of normal peaks and valleys of demand and demonstrate excellent performance when networks are working properly.
ORB's functionality Concurrent Execution: MSMQ allow applications to send requests to many different receivers without waiting for responses, wait for the receivers to process the requests in parallel and process results when all the response messages have arrived, or whenever is convenient.
ORB's functionality Journalled communication: When the journaling feature is enabled for a given queue, MSMQ automatically makes a copy of each message handled in a journal queue. This facilitates logging, auditing and recovery in network-based applications.
ORB's functionality Connectionless communication: With MSMQ, receiving applications can forward messages to other applications by simply resending the same message to a different queue ( or destination ) or by sending the same message several times to any number of other receivers. This is regardless of whether or not they are currently running.

Some of the important features of MSMQ are :

ORB's functionality Guaranteed Message Delivery - Applications sending messages between each other need not even be connected to the network at the same time. MSMQ guarantees that the messages will be delivered as soon as the network connections are established and the receiving application issues a request for sent messages. You will be able to appreciate this better if you realize that any other solution would require that the two systems be up and accessible to each other at the same time.
ORB's functionality Asynchronous communication - Once a client application sends out a message to a receiving application, MSMQ allows the client application to handle other tasks without waiting for a response from the receiving application
ORB's functionality Transaction support - MSMQ supports transactions and is also tightly integrated with MTS. When MTS is present, MTS services automatically participate in an MSMQ transaction.
ORB's functionality One time, in-order delivery - MSMQ guarantees that each message will be delivered once and only once and that the messages are received in the order in which they are sent
ORB's functionality Message routing services - These services give the client app the ability to send messages to their destination using least-cost routing. The administrator only needs to define the cost of each route, and MSMQ will automatically calculate the most economical path for the message. Moreover, this routing is capable of eliminating single points of failure. Hence, MSMQ can reroute around network problems. This is very helpful if you are dealing with unreliable networks such as the internet.
ORB's functionality Notification services - Even though MSMQ allows messages to be sent asynchronously freeing up the client app, in some instances, the sending app may want to be notified whether the message was received successfully. So, MSMQ also allows the sender the option to review resoponses, let another app handle them or just completely ignore them. MSMQ can also journal messages to provide audit trails.
ORB's functionality Dynamic configuration
ORB's functionality High scalability
ORB's functionality ActiveX suport - In addition to the API provided, Microsoft has also provided an ActiveX interface that allows the user to access most of the MSMQ functionality.
ORB's functionality Integration with Windows NT Security System - MSMQ is able to layer into the Window NT security subsystem, leveraging the NT Access Control List facility for controlling queue access.
ORB's functionality Support for MAPI, MS Exchange and other products - MSMQ comes with a MAPI transport provider and an MSMQ Exchange Connector to integrate with other messaging utilities like the MAPI or the MS Exchange. Furthur more, MS in conjunction with Level 8 Systems has developed a product called FalconMQ that extends MSMQ to platforms like AS/400, Unix, MVS, VMS, OS/2 and UNISYS. FalconMQ also provides interoperability with IBM's MQSeries products as well as IBM's CICS Transient Data Queue on MVS.

MSMQ allows messages to be delivered in two ways. Express messages are stored in memory whereas, Recoverable messages are stored in disk storage. MSMQ stores these messages in holding areas called Queues. Messages can be assigned priorities and messages are routed and delivered based first on queue priority and then by message priority.

All systems interoperate within one MSMQ Enterprise. The enterprise is subdivided into Sites. All the systems within a site do not have to run the same network protocol or even be able to directly communicate with each other. Site Links connect one site to the other sites within an Enterprise. Administrators can assign Site Link Costs and while transporting a message, MSMQ will choose the currently available routing path with the lowest overall site cost.

All systems in an MSMQ Enterprise access information from a common MSMQ Information Store (MQIS). The MQIS is a distributed database that holds the enterprise topology, enterprise settings, computer information and queue information. MSMQ-based apps can query the MQIS to find queues and obtain their properties.

There are two types of queues in MSMQ. Public queues are those that are published in the MQIS and are replicated throughout the Enterprise. They can hence be located by any computer on the Enterprise. Private queues on the other hand are not published in the MQIS and can only be accessed by systems that have access to the full path name or format name of the queue.

All systems that are present in an MSMQ Enterprise can be classified into Servers, Dependant Clients and Independant Clients. The Servers can be furthur subdivided into Primary Enterprise Controler(PEC), Primary Site Controller(PSC), Backup Site Controller (BSC) and MSMQ Routing Server.

The PEC server contains information about the enterprise configuration and the configuration keys that are used to authenticate messages. The PSC server which is installed, one for each Site, contains information about about the computers and queues in the site and also functions as an MSMQ routing server. The MSMQ Routing Servers support dynamic routing and immediate store-and forward message queueing. They allow computers using different protocols to communicate.

The BSCs installed at each site provide load balancing and failure recovery should the PSC or PEC fail. The BSC holds a read-only replica of the PSC or PEC database and also functions as the MSMQ Routing Server.

The MSMQ independant clients are installed on machines running Windows 95/98, NT Workstations or NT Servers. They can create and modify queues locally and send and receive messages. They can also create queues and store messages on the local computer without synchronous access to an MSMQ server.

The main difference between independant clents and servers is that the independant clients do not have the store-and forward capability of the MSMQ servers, nor do they store information from the distributed MQIS database.

MSMQ dependant clients function very much like independant clients except that they cannot function without the synchronous support of the MSMQ servers.

The entire MSMQ Enterprise can be managed through the MSMQ Explorer. The MSMQ Explorer provides an interface for managing all machines in a MSMQ environment from a single point of control.

More to come soon...

.

 

click here to go to
My Advanced COM/DNA Tutorial HomePage...


Go to the Component Engineering Cornucopia page

This site was developed and is maintained by Gopalan Suresh Raj

This page has been visited times since April 8,1998.

Last Updated : Apr 8, '98

If you have any questions, comments, or problems regarding this site, please write to me I would love to hear from you.


Copyright (c) 1997-99, Gopalan Suresh Raj - All rights reserved. Terms of use.

All products and companies mentioned at this site,are trademarks of their respective owners.