protected AbstractMessageListenerContainer(IApplicationContext applicationContext, IConnectionFactory connectionFactory, string name = null, ILogger logger = null) : base(connectionFactory) { ApplicationContext = applicationContext; _logger = logger; ErrorHandler = new ConditionalRejectingErrorHandler(_logger); MessagePropertiesConverter = new DefaultMessagePropertiesConverter(_logger); ExclusiveConsumerExceptionLogger = new DefaultExclusiveConsumerLogger(); BatchingStrategy = new SimpleBatchingStrategy(0, 0, 0L); TransactionAttribute = new DefaultTransactionAttribute(); Name = name ?? GetType().Name + "@" + GetHashCode(); }
protected AbstractMessageListenerContainer(IApplicationContext applicationContext, IConnectionFactory connectionFactory, string name = null, ILoggerFactory loggerFactory = null) { _loggerFactory = loggerFactory; _logger = _loggerFactory?.CreateLogger(GetType()); ApplicationContext = applicationContext; ConnectionFactory = connectionFactory; ErrorHandler = new ConditionalRejectingErrorHandler(_logger); MessageHeadersConverter = new DefaultMessageHeadersConverter(_logger); ExclusiveConsumerExceptionLogger = new DefaultExclusiveConsumerLogger(); BatchingStrategy = new SimpleBatchingStrategy(0, 0, 0L); TransactionAttribute = new DefaultTransactionAttribute(); ServiceName = name ?? GetType().Name + "@" + GetHashCode(); }