Rhino Service Bus RemoteApdamainHostをプログラムで構成する方法
-
12-11-2019 - |
質問
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();
.
所属していません StackOverflow