質問

BusConfiguration()でdefaulthostを設定する方法を表示しますが、(rhino.esb config fileセクションを使用せずに)RemoteAppDomainHostをプログラムで設定する方法は表示されません。

役に立ちましたか?

解決 2

ブートストラップから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