문제

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).

도움이 되었습니까?

해결책 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();
    }
}

다른 팁

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top