Basic MSMQ knowledge

Source: Internet
Author: User
Tags msmq

MSMQ (Microsoft Message Queue, Microsoft Message Queue) is an asynchronous transmission mode for communication between multiple different applications. Applications that communicate with each other can be distributed on the same machine, it can also be distributed anywhere in the connected network space. Its implementation principle is: the message sender puts the information he wants to send into a container (we call it message ), then, it is saved to the message queue in a public space of the system. local or remote message receiving programs then extract the messages sent to it from the queue for processing.

I. Basic Concepts

"Message": refers to the Data Unit transmitted between two computers. Messages can be very simple. For example, messages that only contain text strings can be more complex and contain embedded objects.

Message Queue: a container that stores messages during message transmission. The message queue manager acts as a man-in-the-middle when a message is relayed from its source to its target. The main purpose of a queue is to provide a route and ensure message transmission. If the receiver is unavailable when a message is sent, the Message Queue retains the message until it is successfully transmitted.

Message Queue is Microsoft's message processing technology. It provides message processing and Message Queue functions for any application in any computer combination installed with Microsoft Window, whether these computers are on the same network or online at the same time.

Ii. Queue type

1. user queue

Public queue: It is replicated across the "message queue" network and may be accessed by all sites connected to the network.

Dedicated queue: no longer released throughout the network. Instead, they are only available on the local computer where they reside. A dedicated queue can only be accessed by applications that know the full path name or tag of the queue.

Management queue: contains messages that confirm the receipt of messages sent in a given "message queue" network.

Response queue: contains the response message returned to the sending application when the target application receives the message.

2. system queue

Diary queue: Optional stores the copy of the sent message and the copy of the message removed from the queue.

Dead-letter queue: stores copies of messages that cannot be passed or have expired.

Report queue: contains the message indicating that the message is routed to the target. It can also contain test messages. Each computer can have only one report queue.

Dedicated system queue: a dedicated queue for managing and notifying messages required for message processing by a series of storage systems.

Iii. advantages of using message queue

Stability-the impact of component failure on messages is much smaller than that of direct calls between components, because messages are stored in the queue and kept there until they are properly processed.

Priority of a message-more urgent or important messages can be accepted before unimportant messages, so that sufficient response time can be guaranteed for critical applications.

Offline capabilities-when messages are sent, they can be sent to the temporary queue and remain there. Until it is passed successfully.

Security ----- messagequeue component-based message queue technology uses Windows security to protect access control, provide audit, and verify and encrypt messages sent and received by the component.

4. Microsoft Message Queue

With Microsoft Windows "message queue", application developers can send and receive messages to facilitate fast and reliable communication with applications.

Like XML Web Service and. Net remoting, MSMQ is a distributed development technology. However, when using XML Web Service 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. It temporarily stores messages in the client message queue and sends them online to the server for processing.

The advantage of MSMQ is that, due to asynchronous communication, the sender and receiver can execute the remaining code without waiting for the other party to return a successful message, therefore, the transaction processing capability is greatly improved.

V. MSMQ and email

MSMQ is the basis of message applications in Windows operating systems and a development tool for creating Distributed and loosely connected messaging applications.

Message queues and emails have many similarities. They all contain multiple attributes for saving information. The address of the sender and recipient is indicated in the Message Type:

However, their usefulness is very different: the sender and receiver of a message queue are applications, while the sender and receiver of an email are usually people.

 

Best regards,

Charles Chen

MSN: gotosunny@msn.com

 

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.