Пример #1
0
        public Task <IListener> CreateAsync(CancellationToken cancellationToken)
        {
            QueueTriggerExecutor triggerExecutor = new QueueTriggerExecutor(_executor);

            IListener listener = new QueueListener(_queue, _poisonQueue, triggerExecutor, _exceptionHandler, _loggerFactory,
                                                   _messageEnqueuedWatcherSetter, _queueOptions, _queueProcessorFactory, _descriptor);

            return(Task.FromResult(listener));
        }
Пример #2
0
        public Task <IListener> CreateAsync(CancellationToken cancellationToken)
        {
            QueueTriggerExecutor triggerExecutor = new QueueTriggerExecutor(_executor);

            SharedQueueWatcher sharedWatcher = _sharedContextProvider.GetOrCreateInstance <SharedQueueWatcher>(
                new SharedQueueWatcherFactory(_messageEnqueuedWatcherSetter));

            IListener listener = new QueueListener(_queue, _poisonQueue, triggerExecutor,
                                                   _exceptionHandler, _trace, sharedWatcher, _queueConfiguration);

            return(Task.FromResult(listener));
        }
        public Task <IListener> CreateAsync(IFunctionExecutor executor, CancellationToken cancellationToken)
        {
            QueueTriggerExecutor triggerExecutor = new QueueTriggerExecutor(_instanceFactory, executor);
            IDelayStrategy       delayStrategy   = new RandomizedExponentialBackoffStrategy(QueuePollingIntervals.Minimum,
                                                                                            _queueConfiguration.MaxPollingInterval);
            SharedQueueWatcher sharedWatcher = _sharedContextProvider.GetOrCreate <SharedQueueWatcher>(
                new SharedQueueWatcherFactory(_messageEnqueuedWatcherSetter));
            IListener listener = new QueueListener(_queue, _poisonQueue, triggerExecutor, delayStrategy,
                                                   _backgroundExceptionDispatcher, _log, sharedWatcher, _queueConfiguration.BatchSize,
                                                   _queueConfiguration.MaxDequeueCount);

            return(Task.FromResult(listener));
        }
Пример #4
0
        public Task <IListener> CreateAsync(CancellationToken cancellationToken)
        {
            QueueTriggerExecutor triggerExecutor = new QueueTriggerExecutor(_executor);

            IDelayStrategy delayStrategy = new RandomizedExponentialBackoffStrategy(QueuePollingIntervals.Minimum, _queueConfiguration.MaxPollingInterval);

            SharedQueueWatcher sharedWatcher = _sharedContextProvider.GetOrCreateInstance <SharedQueueWatcher>(
                new SharedQueueWatcherFactory(_messageEnqueuedWatcherSetter));

            IListener listener = new QueueListener(_queue, _poisonQueue, triggerExecutor, delayStrategy,
                                                   _exceptionHandler, _trace, sharedWatcher, _queueConfiguration);

            return(Task.FromResult(listener));
        }