예제 #1
0
 public RabbitOperation(IRabbitContext context, IRabbitFactory factory)
 {
     _factory = factory;
     _context = context;
     _context.SetChannel(CommonSetting.Queue_Name);
     CreatConsumer(CommonSetting.Queue_Name);
     MessagePackSerializer.SetDefaultResolver(ContractlessStandardResolver.Instance);
 }
예제 #2
0
        public RabbitConnection(
            ILoggerAdapter <RabbitConnection> logger,
            IRabbitFactory rabbitFactory,
            IDateTimeAbstraction dateTime)
        {
            // TODO: [TESTS] (RabbitConnection) Add tests
            _logger        = logger;
            _rabbitFactory = rabbitFactory;
            _dateTime      = dateTime;
            _config        = new RabbitOutputConfig();

            _connectionEnabled    = _config.Enabled;
            _disabledUntil        = null;
            _connectionErrorCount = 0;
            _coolDownRunCount     = 0;
        }
예제 #3
0
 public RabbitConsumer(IRabbitFactory factory)
 {
     _factory = factory.Create();
 }