Enterprise Library Step by Step series (14)

Source: Internet
Author: User
Tags message queue msmq

Enterprise Library Step by Step Series (14): Create an asynchronous log based on Message Queuing (MSMQ)

A Overview

As we said in the enterprise Library step through step series, the log and test application block consists of 2 parts: client and Distributor. The client is responsible for creating the messages that will be written to the target location by distributor. The client sends a message to distributor based on the distribution policy (distribution strategies), which provides 2 distribution policies in the Application Block: In process and MSMQ, by default in Process policy. The synchronization log is done in the client process, and the asynchronous log is implemented using MSMQ, and the client needs to create a log message and send it to the MSMQ message queue. Another process waits for the arrival of the message and writes the appropriate log sink application block containing a Windows SERVICE:MSMQ distributor Service. When the service is installed, the service detects Message Queuing at a specified interval. Let's take a look at the log and monitor application Block process flowchart:

Two Install and configure MSMQ Distributor Service1. Open the Visual Studio Command line tool and switch to the directory (the default Enterprise Library installation path) C:\Program Files\Microsoft Enterprise Library\bin, run the following command:

Installutil/imsmqdistributor.exe

Note: The service must be installed in this manner or the installation will not succeed. 2. A Setup Service logon dialog box pops up and requires a username and password to be entered. The form of the username and password must be entered as a domain user, in the form of <.\username>, as shown in the following illustration:

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.