. Net message queue Basics

Source: Internet
Author: User
Tags net message queue msmq
Message Base: Windows underlying MSMQ (Microsoft Message Queue) Message Queue 1. Basic terms and concepts (basic terms and concepts) "messages" are data units transmitted between two computers. Messages can be very simple, for example, containing only text strings, or more complex, and may contain embedded objects. Messages are generated when you move the mouse, press the button, and close the window. In Windows, messages exist in the following data structure. typedef struct tagmsg {hwnd; uint message; wparam; lparam; DWORD time; point PT ;}msg; the message contains six messages :. hwnd: the unique hwnd Number of the window/control. The message loop sends messages to the correct target based on this information. . Message: the pre-defined message type ID in windows. . Wparam and lparam: some messages must carry more information, which is stored in wparam and lparam. . Time and PT Program The system will help us generate a Message Queue windows procedure (wndproc): Generally, "Every" window or control has a Windows procedure, to process the behavior of the window/control.. NET Framework.. NET Framework's Windows Forms encapsulate messages cyclically for our convenience. The classes mentioned in this section all belong to the system. Windows. Forms namespace ). Message Queue: like XML Web Services and. Net remoting, MSMQ is a distributed development technology. However, when using XML Web Services or. NET remoting components, the client needs to exchange information with the server in real time, and the server needs to stay online. MSMQ can work when the server is offline. The message is temporarily stored in the client message queue, and then sent to the server for processing when the server is online. Obviously, MSMQ is not suitable for the case where the client needs a timely response from the server. MSMQ interacts with the server asynchronously without worrying about waiting for a long time to process the server.

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.