コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }