Example #1
0
 public EventProcessor(EventHubOptions options, ITriggeredFunctionExecutor executor, ILogger logger, bool singleDispatch)
 {
     _executor                 = executor;
     _singleDispatch           = singleDispatch;
     _batchCheckpointFrequency = options.BatchCheckpointFrequency;
     _logger = logger;
 }
Example #2
0
 public EventHubListener(
     string functionId,
     string eventHubName,
     string consumerGroup,
     string connectionString,
     string storageConnectionString,
     ITriggeredFunctionExecutor executor,
     EventProcessorHost eventProcessorHost,
     bool singleDispatch,
     EventHubOptions options,
     ILogger logger,
     BlobContainerClient blobContainer = null)
 {
     _functionId              = functionId;
     _eventHubName            = eventHubName;
     _consumerGroup           = consumerGroup;
     _connectionString        = connectionString;
     _storageConnectionString = storageConnectionString;
     _executor           = executor;
     _eventProcessorHost = eventProcessorHost;
     _singleDispatch     = singleDispatch;
     _options            = options;
     _logger             = logger;
     _scaleMonitor       = new Lazy <EventHubsScaleMonitor>(() => new EventHubsScaleMonitor(_functionId, _eventHubName, _consumerGroup, _connectionString, _storageConnectionString, _logger, blobContainer));
 }
 public EventHubListener(ITriggeredFunctionExecutor executor, EventProcessorHost eventProcessorHost, bool singleDispatch, EventHubOptions options, ILogger logger)
 {
     _executor           = executor;
     _eventProcessorHost = eventProcessorHost;
     _singleDispatch     = singleDispatch;
     _options            = options;
     _logger             = logger;
 }
Example #4
0
 public EventHubListener(
     string functionId,
     ITriggeredFunctionExecutor executor,
     EventProcessorHost eventProcessorHost,
     bool singleDispatch,
     EventHubOptions options,
     ILogger logger,
     BlobContainerClient blobContainer = null)
 {
     _executor           = executor;
     _eventProcessorHost = eventProcessorHost;
     _singleDispatch     = singleDispatch;
     _options            = options;
     _logger             = logger;
     _scaleMonitor       = new Lazy <EventHubsScaleMonitor>(() => new EventHubsScaleMonitor(
                                                                functionId,
                                                                eventProcessorHost.EventHubName,
                                                                eventProcessorHost.ConsumerGroupName,
                                                                eventProcessorHost.EventHubConnectionString,
                                                                eventProcessorHost.StorageConnectionString,
                                                                _logger,
                                                                blobContainer));
 }
        public EventHubListener(
            string functionId,
            ITriggeredFunctionExecutor executor,
            EventProcessorHost eventProcessorHost,
            bool singleDispatch,
            IEventHubConsumerClient consumerClient,
            BlobsCheckpointStore checkpointStore,
            EventHubOptions options,
            ILogger logger)
        {
            _logger             = logger;
            _executor           = executor;
            _eventProcessorHost = eventProcessorHost;
            _singleDispatch     = singleDispatch;
            _checkpointStore    = checkpointStore;
            _options            = options;

            _scaleMonitor = new Lazy <EventHubsScaleMonitor>(
                () => new EventHubsScaleMonitor(
                    functionId,
                    consumerClient,
                    checkpointStore,
                    _logger));
        }