public EventBusRabbitMQ(IFactoryRabbitMQ factory, IEventBusManager eventBusManager, ILogger <EventBusRabbitMQ> log) { _factory = factory; _eventBusManager = eventBusManager; _eventBusManager.OnRemoveEventHandler += OnRemoveEvent; _log = log; connection = _factory.CreateConnection(); channel = connection.CreateModel(); }
public EventBusRabbitMQ(IFactoryRabbitMQ factory, IEventBusManager eventBusManager, ILogger <EventBusRabbitMQ> log) { _factory = factory; _eventBusManager = eventBusManager; _eventBusManager.OnRemoveEventHandler += OnRemoveEvent; _log = log; connection = _factory.CreateConnection(); channel = connection.CreateModel(); channel.ExchangeDeclare(exchangeName, exchangeType); queueName = InitializeEventConsumer(queueName); }