public async Task simple_relay() { var relay = new RelayLocalEvents(Relay); relay.Queue(new SomeEvent()); await Task.Delay(100); _last.Should().NotBeNull(); _count.Should().Be(1); }
internal EndpointConfig[] Build(ConfigureHost host, IContainerScope container, BusAuditor auditor) => _points.Select(ec => { var ep = ec.Key; var nexus = new MessageHandlersNexus(container, auditor, host); nexus.Add(host.Handlers.Where(ep.CanHandle).ToArray()); var relayer = new RelayLocalEvents(host.Relayer); var processor = new ProcessingService(host.GetStorage <IStoreUnhandledMessages>(), () => new MessageProcessor(nexus, relayer), auditor, host.GetStorage <IFailedMessagesQueue>()); ec.Value(processor); var config = new EndpointConfig(processor); config.Id = new EndpointId(ep.Name, host.HostName); config.HandledMessagesTypes = nexus.GetMessageTypes().ToArray(); processor.Name = config.Id; return(config); }).ToArray();