Пример #1
0
        protected MessageListenerBase(IOptions <RabbitMqConfiguration> options, ILogger <MessageListenerBase <TModel> > logger)
        {
            _logger        = logger;
            _configuration = options.Value;

            Init();
        }
Пример #2
0
        protected MessagePublisherBase(IOptions <RabbitMqConfiguration> options)
        {
            _configuration = options.Value;

            Channel = Connection.CreateModel();
            Channel.ExchangeDeclare(_configuration.Exchange, ExchangeType.Fanout);
        }