Frage

Is it possible to swap out the bus with something like masstransit? I've already got a service bus in my app so don't really want to introduce another one.

Ideally I'd be able to config it via the IoC but it sounds like the bus holds the IoC container?

War es hilfreich?

Lösung

As far as I know you can provide your own implementation of IApplicationBus

public interface IApplicationBus:IList<Type>
{
    void Send(IEventMessage eventMessage);
    void SetMessageHandlerFactory(IMessageHandlerFactory factory);
}

Portable areas use the instance of Bus class that uses intrnally the provided instance for IApplicationBus interface or the local default of ApplicationBus class. It the following interface fits your need so you can easily do it.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top