public DefaultRabbitMQPersistentConnection(IConnectionFactory connectionFactory,
                                            IOptions <RabbitMQEventBusOptions> options,
                                            ILogger <IRabbitMQPersistentConnection> logger)
 {
     this.options           = options.Value;
     this.connectionFactory = connectionFactory;
     this.logger            = logger;
 }
예제 #2
0
 public RabbitMQEventBus(IServiceProvider serviceProvider, IOptions <RabbitMQEventBusOptions> options) : base(serviceProvider)
 {
     this.options = options.Value;
     this.persistentConnection = serviceProvider.GetService <IRabbitMQPersistentConnection>();
     this.subscriptionsManager.OnEventRemoved    += SubsManagerOnEventRemoved;
     this.subscriptionsManager.OnAddSubscription += SubscriptionManagerOnAddSubscription;
     consumerChannel = CreateConsumerChannel();
 }