Exemple #1
0
        void OnSubscriptionManagerEventAdded(object _, EventEventArgs @event)
        {
            if (!_connection.IsConnected)
            {
                _connection.TryConnect(ResiliencePolicies.ConnectionPolicyFactory);
            }

            if (_consumerChannel == null)
            {
                _consumerChannel = CreateConsumerChannel(@event.EventName);
            }
        }
Exemple #2
0
        void OnSubscriptionManagerEventAdded(object _, EventEventArgs @event)
        {
            if (!_connection.IsConnected)
            {
                _connection.TryConnect();
            }

            using (var channel = _connection.CreateModel())
            {
                channel.QueueBind(
                    queue: _queueName,
                    exchange: ExchangeName,
                    routingKey: @event.EventName
                    );
            }
        }