public BusConnector(IGeneralBus left, IGeneralBus right) { _left = new BusAdapter(left); _right = new BusAdapter(right); _left.Subscribe(_right); _right.Subscribe(_left); }
public EventStoreBusConnector( IGeneralBus bus, IEventStoreConnection es, string stream, string name) { _es = es; _stream = stream; _bus = new BusAdapter(bus); _name = name; _bus.Subscribe(this); _es.SubscribeToStreamAsync(stream, true, EventAppeared, SubscriptionDropped); }
public EventStoreBusConnector( IGeneralBus bus, IEventStoreHttpConnection conn, string stream, string name) { _conn = conn; _subscriber = EventStreamSubscriber.Create(_conn, HandleJsonEvent, new MemoryBackedStreamPositionRepositoryForDebugging()); _stream = stream; _name = name; _bus = new BusAdapter(bus); _bus.Subscribe(this); _subscriber.SubscribeTo(stream); }