public RabbitMessageBusConsumer(IAdvancedBus bus, ExchangeConfiguration exchangeConfiguration, QueueConfiguration queueConfiguration, ILogger <RabbitMessageBusConsumer <T> > logger, MessageBusOptions options) : base(bus, exchangeConfiguration, queueConfiguration, options) { _logger = logger; ConfigureBusEvents(); }
public static IServiceCollection AddMessageBusPublisher <T>(this IServiceCollection services, ExchangeConfiguration exchangeConfiguration, QueueConfiguration queueConfiguration, ServiceLifetime serviceLifetime) where T : class { services.Add(new ServiceDescriptor(typeof(IMessageBusPublisher <T>), s => new RabbitMessageBusPublisher <T>(s.GetRequiredService <IAdvancedBus>(), exchangeConfiguration, queueConfiguration, s.GetRequiredService <MessageBusOptions>()), serviceLifetime)); return(services); }
public RabbitMessageBusPublisher(IAdvancedBus bus, ExchangeConfiguration exchangeConfiguration, QueueConfiguration queueConfiguration, MessageBusOptions options) : base(bus, exchangeConfiguration, queueConfiguration) { _options = options; }
public static IServiceCollection AddMessageBusPublisher <T>(this IServiceCollection services, ExchangeConfiguration exchangeConfiguration, QueueConfiguration queueConfiguration) where T : class => AddMessageBusPublisher <T>(services, exchangeConfiguration, queueConfiguration, ServiceLifetime.Singleton);
protected RabbitMessageBusBase(IAdvancedBus bus, ExchangeConfiguration exchangeConfiguration, QueueConfiguration queueConfiguration) { Bus = bus ?? throw new ArgumentNullException(nameof(bus)); ExchangeConfiguration = exchangeConfiguration ?? throw new ArgumentNullException(nameof(exchangeConfiguration)); QueueConfiguration = queueConfiguration ?? throw new ArgumentNullException(nameof(queueConfiguration)); Setup(); }