/// <summary> /// Initializes an instance of the <see cref="StreamProcessor" /> class. /// </summary> /// <param name="streamProcessorStates">The <see cref="IResilientStreamProcessorStateRepository" />.</param> /// <param name="externalEventsCommitter">The <see cref="ICommitExternalEvents"/></param> /// <param name="eventsFetcherPolicy">The <see cref="IAsyncPolicyFor{T}"/> <see cref="ICanFetchEventsFromStream" />.</param> /// <param name="metrics">The system for collecting metrics.</param> /// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> public StreamProcessorFactory( IResilientStreamProcessorStateRepository streamProcessorStates, ICommitExternalEvents externalEventsCommitter, IEventFetcherPolicies eventsFetcherPolicy, IMetricsCollector metrics, ILoggerFactory loggerFactory ) { _streamProcessorStates = streamProcessorStates; _externalEventsCommitter = externalEventsCommitter; _eventsFetcherPolicy = eventsFetcherPolicy; _metrics = metrics; _loggerFactory = loggerFactory; }
/// <summary> /// Initializes a new instance of the <see cref="EventProcessor"/> class. /// </summary> /// <param name="consentId">THe <see cref="ConsentId" />.</param> /// <param name="subscription">The <see cref="Subscription" />.</param> /// <param name="externalEventsCommitter">The <see cref="ICommitExternalEvents"/>.</param> /// <param name="metrics">The system for collecting metrics.</param> /// <param name="logger">The <see cref="ILogger" />.</param> public EventProcessor( ConsentId consentId, SubscriptionId subscription, ICommitExternalEvents externalEventsCommitter, IMetricsCollector metrics, ILogger logger) { _consentId = consentId; Scope = subscription.ScopeId; Identifier = subscription.ProducerTenantId.Value; _subscriptionId = subscription; _externalEventsCommitter = externalEventsCommitter; _metrics = metrics; _logger = logger; }