How to configure Rhino Service Bus RemoteAppDomainHost programmatically?
-
12-11-2019 - |
문제
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();
제휴하지 않습니다 StackOverflow