Farhan's Two Cents on Collaboration, Integration & Enterprise Tech.

Farhan Khan

  Home  |   Contact  |   Syndication    |   Login
  29 Posts | 0 Stories | 35 Comments | 50 Trackbacks

News

Archives

EAI Folks

EAI Standards

EAI Tools

iPhone

Relativity

UnCategorized

Since I have gone through some hard time, figuring/digging out information about the MSMQ distributor service for the Enterprise Library, so I thought it would be worthwhile to document the information that was gathered through various sources. (just post a comment if you need config files).

The MSMQ Distributor Service runs on the computer that acts as the destination for the log entries that are written to the MSMQ Sink. The service processes log entries as they are received by MSMQ and routes them to the Logging and Instrumentation Application Block. This service is not installed by default. You can install the service by performing the following steps:

1. If you want to install the MSMQ distributor service on a computer other than the one where you installed Enterprise Library, copy the files MsmqDistributor.exe, MsmqDistributor.exe.config and loggingDistributorConfiguration.config to the target computer. You can find these files in the bin directory after you have compiled Enterprise Library. (The service can be installed using the files in the bin directory; it will run on the computer where you installed Enterprise Library.) The destination computer must have Message Queuing (also known as MSMQ) installed for the service to operate correctly.
2. Open a Visual Studio command prompt and change to the directory where you copied the files in step 1.
3. Run the following command from the command prompt: installutil /i MsmqDistributor.exe
4. When prompted, enter the user name and password for the account to be used when running the service. User name should be entered in the form of domain\user name.
5. Start the service. The service is installed with a Startup Type of Manual. You may start the service using the Windows Services Management Console.

MSMQ Distributor Service requires configuration file with application-specific settings
The default configuration for the MSMQ Distributor Service does not contain distributor settings for the service. The settings are specific to your application. This means you must use the Configuration Console to create the appropriate settings for the MSMQ Distributor Service. To configure the MSMQ Distributor Service for your application, perform the following steps:
1. Open the file MsmqDistributor.exe.config with a text editor. Remove the configuration section named “loggingConfiguration” and save the file.
2. Using the Configuration Console, open the configuration file MsmqDistributor.exe.config. This file is located in the same directory as the file MsmqDistributor.exe. See note 2.2 for the location of the directory that contains this file.
3. Right-click the configuration node named Distributor Settings, click New, and then click MSMQ Distributor Service. This will add the node named MSMQ Distributor Service to the configuration tree.
4. Click the node named MSMQ Distributor Service to display the configuration settings for that node.
5. (Optional) Change the value for the MsmqPath property. This value should match the name of the queue specified in the configuration of the MSMQ Distribution Strategy of the client application.


Courtesy: Hisham Baz
posted on Friday, June 24, 2005 10:36 PM

Feedback

# re: MSMQ Distributor Service Configuration 9/27/2005 4:11 PM Jay
Thank you very much for your posting.

I am still having trouble getting this to work, can you go over the entire step and plus sample code of working logging? Thank you.

# re: MSMQ Distributor Service Configuration 9/27/2005 9:57 PM Farhan Khan
You are most welcome; its been quite a while since I worked on this one. Can you specifically tell me the problem you are facing and then may be I can dig out the configuration from my code dumps.

# re: MSMQ Distributor Service Configuration 10/20/2005 8:53 AM Will White
Thanks for a helpful post however being a MSMQ novice I have a few questions I hope you can help me with. In the “QueuePath” of the client application do you specify a local queue or the one you configured on your server and if it is a local queue how is the message passed to the queue on the server.

# re: MSMQ Distributor Service Configuration 10/22/2005 11:57 AM Farhan Khan
I apologize for the delay in the response; vacations indeed make a man lethargic :)
As for your questions, firstly you need MSMQ installed on the pc where your client application resides and of course on the server as well. Secondly the Queuepath could be a local queue as well as the server queue. Dont be confused since its like a postal address (which are virtually unique) so contraty to what we may think there are no tricks here :) you can simple specify the server address to write to the server queue and thats all. For extra information MSMQ writes the outgoing messages temporarily to the Out-Going queues on the local machine (like a local post office) before they are sent over and delivered to the server queue (but that is transparent to you).

# re: MSMQ Distributor Service Configuration 10/24/2005 9:35 AM Will White
Thanks for the response I am slowly beginning to piece this together. I have tried changing the queue path to both local and a network queue, it works great with the local queue but the network queue returns the dreaded "Invalid queue path name" error. I think my path is valid: @"DIRECT=OS:[servername]\private$\MSMQ_Test" and the queue exists so it must be a configuration problem, have you encountered anything like this in your studies?



# re: MSMQ Distributor Service Configuration 10/24/2005 11:13 AM Farhan Khan
There are three ways you can reference a queue Friendly Name [Server/Public Queue], FormatName [Formatname:DIRECT=OS:server01\TestQueue] & Label Name. Within the FormatName way of doing it, there are serveral options such as DIRECT/TCP etc. You just have to make sure that you can establish a connection with the PC in question (ping works, DNS resolution is working) and lastly look at your path, currently you are missing 'FormatName:'.

# re: MSMQ Distributor Service Configuration 10/25/2005 6:57 AM Will White
Thanks for the pointers everything is finally working. In the end I needed to modify the MsmqLogDistributionStrategy.cs SendMsmqMesage function by removing the MessageQueueTransactionType object to stop a “Format Name” error. I don’t know if that is specific to out setup or a common problem but everthing now works fine.

# re: MSMQ Distributor Service Configuration and example to send message to MSMQ XP 11/18/2005 7:57 AM Starfo Nguyen
Hi All, I'used November TCP to send a message to MSMQ window XP so I checked in NUnit MSMQ test but don't have config file? Can you give me example which applied config file.
Thanks,
Starfo

# re: MSMQ Distributor Service Configuration 11/30/2005 11:42 AM Farhan Khan
Hey Starfo,
My apologies for the late reply; I have been away for a while from the virtual world. Have you already solved your problem?

# re: MSMQ Distributor Service Configuration 4/12/2006 3:46 PM Teresa Llano
Hello, I'm using the Logging and Instrumentation Application Block with the MSMQ Distribution Strategy. The messages are arriving at the queue but I can't save them in my sinks. I'm using a private queue and the DatabaseSink and ConsoleSink. I don't know what is happening, I installed MSMQ Distributor Service and I started the Enterprise Library Logging Distributor Service but the messages aren't been saved neither in the DatabaseSink nor in the ConsoleSink. Can you help me with this???

Thank you.

# re: MSMQ Distributor Service Configuration 6/28/2006 12:56 AM Leo
Hello, I'm using the Logging and Instrumentation Application Block with the MSMQ Distribution Strategy. The messages are arriving at the queue but I can't save them in my sinks. I'm using a private queue and the DatabaseSink and ConsoleSink. I don't know what is happening, I installed MSMQ Distributor Service and I started the Enterprise Library Logging Distributor Service but the messages aren't been saved neither in the DatabaseSink nor in the ConsoleSink. Can you help me with this???

Thank you.

# re: MSMQ Distributor Service Configuration 9/2/2008 2:26 PM Tanweer Badami
Hi,

Thanks for writing that article. I followed the steps and was able to install the service but when I tried to find out the service in Services, I can't find it. I am looking for MSMQ Distributor Service. Please let me know if I am doing anything wrong.
I want to see "Logging and Instrumentation Application Block" in my Enterprise Library Configuration.


# re: MSMQ Distributor Service Configuration 1/19/2009 11:13 PM Rana
Tanweer,
Hope u must be using Ent Lib 4 or 4.1 by this time.
You can find the service with the name "ENTERPRISE LIBRARY DISTRIBUTOR SERVICE"

I know its a late response. But i felt posting this info here will help others who are visiting this site as it has got excellent spoon feeding info for newbies.

Thanks to FARHAN

HTH


# re: MSMQ Distributor Service Configuration 3/20/2009 9:29 AM Jason
Thanks for the Post. It has helped me get this service up and running; however, in our production environment we do not have any domain controlers. Is there any way to get msmqdistributor.exe working with a non domain user? i.e. servername\username

I have installed it with a servername\username, but no matter how I set the user's permissions the msmqdistributor.exe is unable to process messages on the queue.

Any help would be greatly appreciated.

# re: MSMQ Distributor Service Configuration 5/19/2009 7:14 PM Jaikish
I am trying to configure an asynchronous logging solution using EntLib 2.0 (January 2006 version). I have configured a MSMQ tracelistener pointing to a private queue and that part is working fine. I am able to see the message in the queue.

I am trying to configure MSMQDistributor.exe as mentioned in the article. But, when I open the MSMQDistributor.exe.config file using the configuration console, I do not get options to specify distributor settings. I installed MSMQ recently. Do I need to reinstall entlib for this setting to be available?

Best regards,
Jaikish

# re: MSMQ Distributor Service Configuration 10/29/2009 4:27 PM Ryan
I am having trouble getting it to pull messages off the message queue and distribute to my trace listeners. I have configured a private queue on my local machine and created a console application for testing and added some messages to the queue. The msmq distributor service is running on the same machine with no errors monitoring this queue with the same path I used to add the messages. None of the messages are coming off the queue! Any ideas?

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: