我看到一种用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();
.

https://github.com/bjro/learningrhinoservicebus

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top