WCF Distributed Development Prerequisites (1): MSMQ Message Queuing

Source: Internet
Author: User
Tags message queue msmq

Does learning WCF not need to learn. Net Remoting, ASMX, WSE, and MSMQ?

This problem has always been a concern for many developers. According to Microsoft, WCF is a synthesizer of Microsoft's distributed Application development, learning WCF programming, and there is no need to understand other technologies. The emergence of WCF does solve a lot of problems and it integrates. NET platform and distributed systems, such as. NET Remoting, ASMX, WSE, and MSMQ. In terms of communication (communiation), it can span processes, across machines, across subnets, corporate networks, and the Internet, and can be hosted by Asp.net,exe,wpf,windows Forms,nt service,com+ (host). Developers can build a cross-platform, secure, reliable, and enterprise-class interconnect application solution that supports transactional processes. Now that WCF is so powerful, developers don't have to learn the different technologies of. Net Remoting,asmx.

But that's not the case, first of all, the upgrading of technology is not so rapid, we contact the work platform and technical articles will not be due to the emergence of WCF all updated, and secondly as a developer, in the actual development process to learn or solve technical problems, must know its related concepts, a solid foundation of knowledge can not be less.

In this section we'll take a look at the basic concepts and development processes of MSMQ. Let's start by understanding what MSMQ is:

MSMQ full name Microsoft Message Queue, which is an asynchronous transmission mode for mutual communication between different applications, can be distributed on the same machine or anywhere in the connected network space by the application of mutual communication. The idea is that the sender of the message puts the information he wants to send into a container (which we call the message), and then saves it to a system common-space messages queue , a local or offsite message receiver is then removed from the queue to process the message sent to it.

Two of these are important concepts. One is message messages and one is queue queues.

Message messages are information that is required by both sides of the communication, and can be a variety of media, such as text, sounds, images, and so on. The final understanding of the message, for the two sides of the message to agree beforehand, the advantage is that the first is equivalent to a simple encryption of data, the second is the use of their own definition of the format can save the transfer of traffic. Messages can contain the identity of the sending and the recipient, and only the specified user can see the receipt. Time stamp, which is convenient for the receiver to deal with some time related applications. Cut-off time, the message has not arrived within the specified time is invalid.

The types of queues mainly include several:

Public queues are replicated throughout the Message Queuing network and may be accessed by all sites that are connected to the network.

Private queues are not published throughout the network. Instead, they are available only on the local computer where they reside. A private queue can only be accessed by an application that knows the full pathname or label of the queue.

The management queue contains messages confirming receipt receipts for messages sent in a given Message Queuing network. Specifies the administrative queues (if any) that you want the MessageQueue component to use.

Response queues contain response messages that are returned to the sending application when a message is received by the target application. Specifies the response queue (if any) that you want the MessageQueue component to use.

A Message Queuing queue is a public storage space for sending and receiving messages that can exist in memory or in a physical file. Messages can be sent in two ways, express and recoverable (recoverable), the difference being that the Express mode is placed in memory for the message, and the recoverable mode is on the physical disk (see also MSDN for details).

After understanding the basic concepts of Message Queuing MSMQ related, we know that it's

Benefits: Stability, message prioritization, offline capabilities, and security, guaranteed messaging, and reliable fail-safe mechanisms for performing many business processes.

Disadvantage: MSMQ is not suitable for client to require real-time server-side interaction. A large number of requests, response latency.

The benefits determine its loosely coupled nature, and Message Queuing is also one way to implement an SOA object-oriented architecture. Now let's take a look at simple MSMQ programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.