public class BootStrapper : AutofacBootStrapper
{
protected override void ConfigureContainer()
{
base.ConfigureContainer();
var builder = new ContainerBuilder();
builder.RegisterGeneric(typeof(InMemorySagaPersister<>)).As(typeof(ISagaPersister<>));
builder.Update(Container);
}
protected override void OnBeginStart()
{
base.OnBeginStart();
XmlConfigurator.Configure();
}
}
and here is the configuration of the bus
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="rhino.esb" type="Rhino.ServiceBus.Config.BusConfigurationSection, Rhino.ServiceBus"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="msmq://localhost/rsb-retention" transactional="false" />
<messages>
<add name="MyNamespace.Timeout" endpoint="msmq://localhost/rsb-retention" transactional="false" />
</messages>
</rhino.esb>
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level [%ndc] - %message%newline"/>
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="ConsoleAppender"/>
</root>
</log4net>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Rhino.Queues" publicKeyToken="0b3305902db7183f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.4.1.0" newVersion="1.4.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
The assembly binding is because Rhino.ServiceBus.Host.exe works with Rhino.Qieies 1.4.1.0 :)