Question

Je vois un moyen de configurer le DefaulThost avec BusConfiguration (), mais je ne vois pas de moyen de configurer le RemoteAppdomainHost par programme (sans utiliser une section de fichier de configuration Rhino.esb).

Était-ce utile?

La solution 2

Remplacez BeginStart de votre bootstrapper et appelez UseConfiguration. Voici un exemple de code qui fonctionne pour moi:

public class RemoteAppBootstrapper : AutofacBootStrapper
{
    protected override void OnBeginStart()
    {
        var busConfiguration = new HostConfiguration()
            .Bus( "msmq://localhost/endpoint.a" )
            .ToBusConfiguration();

        UseConfiguration( busConfiguration );

        base.OnBeginStart();
    }
}

Autres conseils

var cashier = new RemoteAppDomainHost(typeof(CashierBootStrapper))
                .Configuration("Cashier.config");
cashier.Start();

Voir https://github.com/bjro/learningrhinoservicebus

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top