Esempio n. 1
0
        private void RegisterConsumers()
        {
            IConnection connection = RabbitConnector.GetConnection();

            _consumers = new List <IRabbitConsumer>()
            {
                new CommandConsumer(connection, new QueryExecutor(), new QueryExecutorRabbitSettings()),
            };
        }
Esempio n. 2
0
        protected override void OnStop()
        {
            IConnection connection = RabbitConnector.GetConnection();

            foreach (var consumer in _consumers)
            {
                consumer.Close();
            }
            connection.Close();
        }