public LocalMessageDispatcher(
     MessageHandlerRegistry messageHandlerRegistry,
     IHandlerUnitOfWorkFactory handlerUnitOfWorkFactory,
     IUnconfiguredMessageHandlingStrategy fallbackHandler)
 {
     _messageHandlerRegistry =
         messageHandlerRegistry
         ?? throw new ArgumentNullException(nameof(messageHandlerRegistry));
     _unitOfWorkFactory =
         handlerUnitOfWorkFactory
         ?? throw new ArgumentNullException(nameof(handlerUnitOfWorkFactory));
     _fallbackHandler =
         fallbackHandler
         ?? throw new ArgumentNullException(nameof(fallbackHandler));
 }
Beispiel #2
0
 public Consumer(
     MessageHandlerRegistry messageHandlerRegistry,
     IHandlerUnitOfWorkFactory unitOfWorkFactory,
     IConsumerScopeFactory consumerScopeFactory,
     IUnconfiguredMessageHandlingStrategy fallbackHandler,
     bool isAutoCommitEnabled = false)
 {
     _localMessageDispatcher =
         new LocalMessageDispatcher(
             messageHandlerRegistry,
             unitOfWorkFactory,
             fallbackHandler);
     _consumerScopeFactory =
         consumerScopeFactory
         ?? throw new ArgumentNullException(nameof(consumerScopeFactory));
     _isAutoCommitEnabled = isAutoCommitEnabled;
 }
Beispiel #3
0
 public LocalMessageDispatcher(MessageHandlerRegistry messageHandlerRegistry, IHandlerUnitOfWorkFactory handlerUnitOfWorkFactory)
 {
     _messageHandlerRegistry = messageHandlerRegistry ?? throw new ArgumentNullException(nameof(messageHandlerRegistry));
     _unitOfWorkFactory      = handlerUnitOfWorkFactory ?? throw new ArgumentNullException(nameof(handlerUnitOfWorkFactory));
 }