Hibernating Rhinos | Rhino Service Bus - Logging

The first thing most people will notice when building a multi-threaded distributed system is that it can be very hard to see what's going on. Fortunately, RSB logs a lot of information and this is usually the easiest way to diagnose what's happening under the covers.

Sample Configuration

This will log everything to Visual Studio's Output window.

<?xml version="1.0"?>
<configuration>
    <configSections>
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
    </configSections>
    <log4net>
        <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level [%ndc] - %message%newline"/>
            </layout>
        </appender>
        <root>
            <level value="DEBUG"/>
            <appender-ref ref="TraceAppender"/>
        </root>
    </log4net>
</configuration>

In your startup code.

private void InitializeLogger()
{
    XmlConfigurator.Configure();
}

Common log messages

  • Got message [MessageType], but had no consumers for it - This message can mean a few different things. You haven't registered your consumer in Windsor. The message is for a Saga that is already complete. You have possibly sent your message to the wrong endpoint (by configuring the message owner incorrectly). The message is then placed in the Discarded subqueue.
  • Failed to process message - This message is logged typically when an error occurs inside the consumer. The error processing logic will apply here and retry until the numberOfRetries configuration value has been reached. In which case the message will be placed in the Errors subqueue.
Last update: 6/12/2010 8:52:11 PM