Как настроить сервисный автобус Rhino RemoteAppdomainhost программно?

StackOverflow https://stackoverflow.com/questions/5980876

  •  12-11-2019
  •  | 
  •  

Вопрос

Я вижу способ настроить нефловый полет с busconfiguration (), но не вижу способа настроить RemoteAppdomainhost программно (без использования файла файла confight rhino.esb).

Это было полезно?

Решение 2

Переопределить BUNTSTART от вашего BootStrapper и вызовите 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