Introduction to Messaging
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Microsoft Windows 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, seven 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 Microsoft Visual Studio and the Microsoft Windows Software Development Kit (SDK), 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. You can also use Server Explorer to view message queues on any server to which you have access, and to view information about the messages contained in these queues. You can add a queue from Server Explorer to your component's designer to automatically create a component that is configured to interact with the queue.
Interacting with Message Queues
Messaging and messages provide a powerful and flexible mechanism for interprocess communication between components of a server-based application. They have a number of advantages over direct calls between components, including:
Robustness — Messages are considerably less affected by component failures than direct calls between components, because messages 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 can be sent to temporary queues when they are sent and remain that way until they are successfully delivered. Users can continue to perform operations when access to the necessary queue is unavailable for whatever reason. 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 security to secure access control, provide auditing, and encrypt and authenticate the messages your component sends and receives.
Restrictions
Your system must meet the following requirements to develop MessageQueue components:
To see queue information in Server Explorer or to access queues programmatically, you must install Message Queuing on your client computer.
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.
See Also
Tasks
How to: Create MessageQueue Component Instances