Question

I see a way to configure the DefaultHost with BusConfiguration(), but do not see a way to configure the RemoteAppDomainHost programmatically (without using a rhino.esb config file section).

Was it helpful?

Solution 2

Override BeginStart from your bootstrapper and call UseConfiguration. Here's sample code that is working for me:

public class RemoteAppBootstrapper : AutofacBootStrapper
{
    protected override void OnBeginStart()
    {
        var busConfiguration = new HostConfiguration()
            .Bus( "msmq://localhost/endpoint.a" )
            .ToBusConfiguration();

        UseConfiguration( busConfiguration );

        base.OnBeginStart();
    }
}

OTHER TIPS

var cashier = new RemoteAppDomainHost(typeof(CashierBootStrapper))
                .Configuration("Cashier.config");
cashier.Start();

See https://github.com/BjRo/LearningRhinoServiceBus

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top