Esempio n. 1
0
 internal MessageConsumer(
     IMessageConsumerSettings settings,
     IAzureStorageQueue <T> queue,
     IMessageConsumerQueuePolingPolicy queuePolingPolicy,
     IMessageHandler <T> messageHandler,
     IMessageHandler <T> failedMessageHandler,
     IMessageExceptionHandler <T> exceptionHandler
     )
 {
     _settings             = settings ?? throw new ArgumentNullException(nameof(settings));
     _queue                = queue ?? throw new ArgumentNullException(nameof(queue));
     _queuePolingPolicy    = queuePolingPolicy ?? throw new ArgumentNullException(nameof(queue));
     _messageHandler       = messageHandler ?? throw new ArgumentNullException(nameof(messageHandler));
     _failedMessageHandler = failedMessageHandler;
     _exceptionHandler     = exceptionHandler;
 }
 public IMessageConsumerBuilder <T> AndHandlesMessageExceptionsUsing(Func <IMessage <T>, Exception, CancellationToken, Task <bool> > messageExceptionHandler)
 {
     _exceptionHandler = new InternalFunctionMessageExceptionHandler <T>(messageExceptionHandler);
     return(this);
 }
        public MessagePropagator(IMessageExceptionHandler messageExceptionHandler)
        {
            _messageExceptionHandler = messageExceptionHandler;

            RegisterDefaultTaskDispatchers();
        }
 public IMessageConsumerBuilder <T> AndHandlesMessageExceptionsUsing(IMessageExceptionHandler <T> messageExceptionHandler)
 {
     _exceptionHandler = messageExceptionHandler;
     return(this);
 }