public SharedBlobQueueListener Create() { IStorageQueue blobTriggerPoisonQueue = _queueClient.GetQueueReference(HostQueueNames.BlobTriggerPoisonQueue); BlobQueueTriggerExecutor triggerExecutor = new BlobQueueTriggerExecutor(_blobWrittenWatcher); IDelayStrategy delayStrategy = new RandomizedExponentialBackoffStrategy(QueuePollingIntervals.Minimum, _queueConfiguration.MaxPollingInterval); IListener listener = new QueueListener(_hostBlobTriggerQueue, blobTriggerPoisonQueue, triggerExecutor, delayStrategy, _exceptionHandler, _trace, _sharedQueueWatcher, _queueConfiguration); return(new SharedBlobQueueListener(listener, triggerExecutor)); }
public SharedBlobQueueListener Create() { BlobQueueTriggerExecutor triggerExecutor = new BlobQueueTriggerExecutor(_blobWrittenWatcher, _loggerFactory.CreateLogger <BlobListener>()); // The poison queue to use for a given poison blob lives in the same // storage account as the triggering blob by default. In multi-storage account scenarios // that means that we'll be writing to different poison queues, determined by // the triggering blob. // However we use a poison queue in the host storage account as a fallback default // in case a particular blob lives in a restricted "blob only" storage account (i.e. no queues). var defaultPoisonQueue = _hostQueueServiceClient.GetQueueClient(HostQueueNames.BlobTriggerPoisonQueue); // This special queue bypasses the QueueProcessorFactory - we don't want people to override this. // So we define our own custom queue processor factory for this listener var queueProcessorFactory = new SharedBlobQueueProcessorFactory(triggerExecutor, _hostBlobTriggerQueue, _loggerFactory, _queueOptions, defaultPoisonQueue); IListener listener = new QueueListener(_hostBlobTriggerQueue, defaultPoisonQueue, triggerExecutor, _exceptionHandler, _loggerFactory, _sharedQueueWatcher, _queueOptions, queueProcessorFactory, _functionDescriptor, functionId: SharedBlobQueueListenerFunctionId); return(new SharedBlobQueueListener(listener, triggerExecutor)); }
public SharedBlobQueueListener Create() { BlobQueueTriggerExecutor triggerExecutor = new BlobQueueTriggerExecutor(_blobWrittenWatcher); // The poison queue to use for a given poison blob lives in the same // storage account as the triggering blob by default. In multi-storage account scenarios // that means that we'll be writing to different poison queues, determined by // the triggering blob. // However we use a poison queue in the host storage account as a fallback default // in case a particular blob lives in a restricted "blob only" storage account (i.e. no queues). IStorageQueue defaultPoisonQueue = _hostAccount.CreateQueueClient().GetQueueReference(HostQueueNames.BlobTriggerPoisonQueue); // this special queue bypasses the QueueProcessorFactory - we don't want people to // override this QueueProcessorFactoryContext context = new QueueProcessorFactoryContext(_hostBlobTriggerQueue.SdkObject, _trace, _queueConfiguration, defaultPoisonQueue.SdkObject); SharedBlobQueueProcessor queueProcessor = new SharedBlobQueueProcessor(context, triggerExecutor); IListener listener = new QueueListener(_hostBlobTriggerQueue, defaultPoisonQueue, triggerExecutor, _exceptionHandler, _trace, _sharedQueueWatcher, _queueConfiguration, queueProcessor); return(new SharedBlobQueueListener(listener, triggerExecutor)); }
public SharedBlobQueueProcessor(QueueProcessorFactoryContext context, BlobQueueTriggerExecutor executor) : base(context) { _executor = executor; }
public SharedBlobQueueListener(IListener listener, BlobQueueTriggerExecutor executor) { _listener = listener; _executor = executor; }
public SharedBlobQueueProcessor(BlobQueueTriggerExecutor triggerExecutor, QueueClient queue, QueueClient poisonQueue, ILoggerFactory loggerFactory, QueuesOptions queuesOptions) : base(new QueueProcessorOptions(queue, loggerFactory, queuesOptions, poisonQueue)) { _executor = triggerExecutor; }