private async Task RunImplAsync(CancellationToken stoppingToken) { var dispatcher = new MessageDispatcher( SerializationRegister, Monitor, MiddlewareMap, _loggerFactory, MessageBackoffStrategy, MessageContextAccessor); var subscriptionGroupFactory = new SubscriptionGroupFactory( dispatcher, Monitor, _loggerFactory); SubscriptionGroups = subscriptionGroupFactory.Create(_defaultSubscriptionGroupSettings, _subscriptionGroupSettings); _log.LogInformation("Starting bus with settings: {@Response}", SubscriptionGroups.Interrogate()); try { await SubscriptionGroups.RunAsync(stoppingToken).ConfigureAwait(false); } catch (OperationCanceledException) { _log.LogDebug("Suppressed an exception of type {ExceptionType} which likely " + "means the bus is shutting down.", nameof(OperationCanceledException)); // Don't bubble cancellation up to Completion task } }
public InterrogationResult Interrogate() { var publisherDescriptions = _publishersByType.ToDictionary(x => x.Key.Name, x => x.Value.Interrogate()); return(new InterrogationResult(new { Config.Region, Middleware = MiddlewareMap.Interrogate(), PublishedMessageTypes = publisherDescriptions, SubscriptionGroups = SubscriptionGroups?.Interrogate() })); }
public InterrogationResult Interrogate() { var publisherDescriptions = _publishersByType.Select(publisher => publisher.Key.Name).ToArray(); return(new InterrogationResult(new { Config.Region, Middleware = MiddlewareMap.Interrogate(), PublishedMessageTypes = publisherDescriptions, SubscriptionGroups = SubscriptionGroups?.Interrogate() })); }