MSMQ Distributor database config error

Topics: Data Access Application Block, Logging Application Block
Jul 20, 2007 at 8:09 PM

I have a MSMQ distributor setup to take messages of a private MSMQ and write them to a database. The MSMQ recieves messages properly and the MSMQ Distributor takes the messages from the msmq queue's as well, the problem is that I don't see the messages in the database (MS SQL Server 2005).

I am trying to figure out if there is a connection issue or some problem between the distributor and the database but I don't see any events in the event log.

I even went as far as giving bad connection strings in the MSMQ distributor config but even then I don't see the problems in the event log.

Is there some way to get this type of information?
Jul 21, 2007 at 2:50 PM
Hi John,

There are different places where you could look, and different places where configuration needs to be specified.

The first cause for an entry not being logged is that the logging block in the distributor doesn't know what to do with it, i.e. the category for the entry is not configured. If this happens, the logging block will attempt to log it to the "not processed" category, so you can configure this special source with an event log trace listener to catch this situation.

The second cause is that there's an error logging to the intended destination. The logging block will first attempt to log an entry to the "errors" special source, that will again need a trace listener if you want this mechanism to be used. If this source is not configured, the standard instrumentation features will be used and an entry will be logged to the event log if such logging is enabled.

There's yet a third situation, but unfortunately there is no instrumentation for it: if you define filters in the distributor side the entry won't be logged.

Hope this helps,
Jul 23, 2007 at 5:28 PM
I don't have filters enabled and my config says to log errors to the event log. Nothing shows up though. Is there any way to test if the application event log is writable?
Jul 23, 2007 at 5:44 PM
Hi John,

You can use the EventLog api to write an entry. However, you don't necessarily have to log logging errors to the event log; you can attach any kind of trace listener to the "special sources".

Btw, what do you mean when you state that the "config says to log errors to the event log"? Can you post the configuration snippet? This could very well mean that instrumentation to the event log is enabled or that the errors special source is configured with an event log trace listener.

Jul 24, 2007 at 8:10 PM
Yes, event log trace listeners are enabled.

There must have been some network issue because the msmq can write to the db now.