-
Notifications
You must be signed in to change notification settings - Fork 110
Updating to 2.0
The major change for RSB in v2.0 is that it is now container agnostic. As of this writing RSB has support for Castle Windsor, Unity, Autofac, and StructureMap. Due to amount of dependencies RSB previously had on Castle Windsor quite a few changes were necessary. The choices made to make things agnostic were made partly to break the dependency, and second to make the least amount of change necessary for existing users. Below details the various things that require change. If I have missed anything please feel free to let me know on the mailing list, or edit this page to fill in the parts I missed.
public class StartupCode
{
public StartupCode()
{
var container = new WindsorContainer();
new RhinoServiceBusConfiguration()
.UseCastleWindsor(container) //can be any of the containers supported
.UseStandaloneConfigurationFile("MyOwn.config") //not required
.Configure();
}
}
If you inherited from AbstractBootstrapper, you must change to inherit from container specific bootstrapper.
You must now specify the container specific LoadBalancerBootstrapper assembly when using Rhino.ServiceBus.Host. For instance you would specify the assembly to be Rhino.ServiceBus.Castle.dll and optionally specify the CastleLoadBalancerBootstrapper in the host service options.
<configuration>
<configSections>
<section name="rhino.esb" type="Rhino.ServiceBus.Config.BusConfigurationSection, Rhino.ServiceBus"/>
</configSections>
<rhino.esb>
<bus threadCount="1"
numberOfRetries="5"
endpoint="msmq://localhost/test_queue2"
/>
<messages>
<add name="Rhino.ServiceBus.Tests"
endpoint="msmq://localhost/test_queue"/>
<add name="Rhino.ServiceBus.Tests"
endpoint="msmq://localhost/test_queue2"/>
</messages>
<security>
<key>f/gdDWbDqHRvpqdRbTs3mxhGdZh9qCaDrasxJGXl+5s=</key>
</security>
</rhino.esb>
</configuration>