Unfortunately, there's no configurable property to turn on/off this behavior in the msmqDistributorSettings. You would have to modify the source code. If you're going to look at the ReceiveQueuedMessages method of the MsmqLogDistributor class,
it has the following lines of code:
if (logEntry != null)
message = msmq.Receive();
As you may have already know, the Logging Application Block is designed to fail gracefully in case of exceptions including if one or all of the tracelisteners failed to do logging. So even if an exception occured while calling logWriter.Write,
it is not propagated to the calling method. Thus, the msmq.Receive will always be called.
Modifying the current behavior would require you to add a way for determining if an exception occured while logging. The simplest would be to modify the Write method of the LogWriter class to return a boolean indicating the logging is successful or
Global Technology and Solutions