public EventBatchingTests() { _eventConsumerService = Substitute.For <IEventConsumerService>(); _checkpointClient = Substitute.For <ICheckpointClient>(); _logger = Substitute.For <ITelemetryLogger>(); _options.FlushTimespan = 300; _options.MaxEvents = 5; }
public BaseEventProcessor( EventProcessorClient eventProcessorClient, IEventConsumerService eventConsumerService, ICheckpointClient checkpointClient, ITelemetryLogger logger) { EventConsumerService = EnsureArg.IsNotNull(eventConsumerService, nameof(eventConsumerService)); CheckpointClient = EnsureArg.IsNotNull(checkpointClient, nameof(checkpointClient)); EventProcessorClient = EnsureArg.IsNotNull(eventProcessorClient, nameof(eventProcessorClient)); Logger = EnsureArg.IsNotNull(logger, nameof(logger)); }
public EventBatchingService(IEventConsumerService eventConsumerService, EventBatchingOptions options, ICheckpointClient checkpointClient, ITelemetryLogger logger) { EnsureArg.IsNotNull(options); EnsureArg.IsInt(options.MaxEvents); EnsureArg.IsInt(options.FlushTimespan); _eventPartitions = new ConcurrentDictionary <string, EventPartition>(); _eventConsumerService = eventConsumerService; _maxEvents = options.MaxEvents; _flushTimespan = TimeSpan.FromSeconds(options.FlushTimespan); _checkpointClient = checkpointClient; _logger = logger; }
public static EventProcessor GetEventProcessor( IConfiguration config, IEventConsumerService eventConsumerService, ICheckpointClient checkpointClient, ITelemetryLogger logger) { var eventBatchingOptions = new EventBatchingOptions(); config.GetSection(EventBatchingOptions.Settings).Bind(eventBatchingOptions); var eventBatchingService = new EventBatchingService(eventConsumerService, eventBatchingOptions, checkpointClient, logger); var eventHubReader = new EventProcessor(eventBatchingService, checkpointClient, logger); return(eventHubReader); }
public EventProcessor(IEventConsumerService eventConsumerService, ICheckpointClient checkpointClient, ITelemetryLogger logger) { _eventConsumerService = eventConsumerService; _checkpointClient = checkpointClient; _logger = logger; }
public EventProcessor(EventProcessorClient processor, IEventConsumerService eventConsumerService, ICheckpointClient checkpointClient, ITelemetryLogger logger) : base(processor, eventConsumerService, checkpointClient, logger) { }