void OnSubscriptionManagerEventAdded(object _, EventEventArgs @event) { if (!_connection.IsConnected) { _connection.TryConnect(ResiliencePolicies.ConnectionPolicyFactory); } if (_consumerChannel == null) { _consumerChannel = CreateConsumerChannel(@event.EventName); } }
void OnSubscriptionManagerEventAdded(object _, EventEventArgs @event) { if (!_connection.IsConnected) { _connection.TryConnect(); } using (var channel = _connection.CreateModel()) { channel.QueueBind( queue: _queueName, exchange: ExchangeName, routingKey: @event.EventName ); } }