문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top