如何以编程方式配置Rhino Service Bus Remoteappdomainhost?
-
12-11-2019 - |
题
我看到一种用busconfiguration()配置defaulthost的方法,但没有看到以编程方式配置RemoteAppdomainhost的方法(而不使用rhino.esb配置文件部分)。
解决方案 2
从Bootstrapper覆盖BeginStart并调用UseConfiguration。这是为我工作的示例代码:
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