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

            if (_consumerChannel == null)
            {
                _consumerChannel = CreateConsumerChannel(@event.EventName);
            }
        }
Esempio n. 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
                    );
            }
        }