This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Introduction to Messaging
Microsoft Message Queuing makes it easy for application developers to communicate with application programs quickly and reliably by sending and receiving messages. Messaging provides you with guaranteed message delivery and a robust, fail-safe way to carry out many of your business processes. For example, suppose you have a retail point-of-sale application that must run 24 hours a day, 7 days a week. If the database system behind the application goes down your sales staff might need to start taking orders manually. Using Message Queuing, you can set up the system so that the orders that cannot be processed during the downtime are automatically put into a queue and processed as soon as the database comes back up.
In the NGWS frameworks, you can use an instance of the MessageQueue component to quickly and easily connect to existing message queues, examine their contents, and send and receive messages.
Interacting with Message Queues
Messaging and messages play a central role in the life of a distributed application. Essentially, interprocess communication between components of a server-based application is heavily dependent on messages (rather than direct calls between components). Reasons include:
- Robustness — Messages are considerably less affected by component failures, because they are stored in queues and remain there until processed appropriately. Messaging is similar to transaction processing, because message processing is guaranteed.
- Message prioritization — More urgent or important messages can be received before less important messages, so you can guarantee adequate response time for critical applications.
- Offline capabilities — Messages are queued when they are sent and remain that way until they are successfully delivered. Developers can continue to perform operations when access to the necessary queue is unavailable for whatever reason. Each operation queues a message, which is sent to the queue when it becomes available. In the meantime, additional operations can proceed as if the message had already been processed, because the message delivery is guaranteed when the network connection is restored.
- Transactional messaging — You can couple several related messages into a single transaction, ensuring that the messages are delivered in order, delivered only once, and are successfully retrieved from their destination queue. If any errors occur, the entire transaction is cancelled.
- Security — The Message Queuing technology on which the MessageQueue component is based uses Windows® 2000 security to secure access control, provide auditing, and encrypt and authenticate the messages your component sends and receives.
Requirements
Your system must meet the following requirements to develop MessageQueue components:
- To interact with queues programmatically, you must have Message Queuing installed on your client computer. Message Queuing is installed as part of Microsoft BackOffice.
Note When you install Message Queuing, you select the primary Message Queuing server to which you want to connect. You cannot view or manipulate queues that reside on another primary Message Queuing server.
- Message Queuing can be run in either a domain or a workgroup environment. In the context of Message Queuing, a domain environment includes domain controllers that provide a directory service such as Active Directory, and a workgroup environment is any environment that does not provide such a directory service.
- You must have either Windows 2000 Server or Workstation version installed to work with Microsoft Message Queuing. You can use MSMQ 1.0 with Windows NT version 4.0.
- You can create MessageQueue components in both Web applications and Windows applications built with the NGWS runtime.
See Also
Message Queues and Messaging Technology Backgrounder | Message Queuing and E-mail Systems | Creating MessageQueue Components