Example #1
0
 public ErrorIngestion(ErrorIngestor errorIngestor, string errorQueue, RawEndpointFactory rawEndpointFactory, IDocumentStore documentStore, LoggingSettings loggingSettings, Func <string, Exception, Task> onCriticalError)
 {
     this.errorIngestor      = errorIngestor;
     this.errorQueue         = errorQueue;
     this.rawEndpointFactory = rawEndpointFactory;
     this.onCriticalError    = onCriticalError;
     importFailuresHandler   = new SatelliteImportFailuresHandler(documentStore, loggingSettings, onCriticalError);
 }
Example #2
0
        public ErrorIngestionComponent(
            Settings settings,
            IDocumentStore documentStore,
            IDomainEvents domainEvents,
            RawEndpointFactory rawEndpointFactory,
            LoggingSettings loggingSettings,
            BodyStorageFeature.BodyStorageEnricher bodyStorageEnricher,
            IEnrichImportedErrorMessages[] enrichers,
            IFailedMessageEnricher[] failedMessageEnrichers,
            ErrorIngestionCustomCheck.State ingestionState
            )
        {
            var announcer = new FailedMessageAnnouncer(domainEvents);
            var persister = new ErrorPersister(documentStore, bodyStorageEnricher, enrichers, failedMessageEnrichers);
            var ingestor  = new ErrorIngestor(persister, announcer, settings.ForwardErrorMessages, settings.ErrorLogQueue);
            var ingestion = new ErrorIngestion(ingestor, settings.ErrorQueue, rawEndpointFactory, documentStore, loggingSettings, OnCriticalError);

            failedImporter = new ImportFailedErrors(documentStore, ingestor, rawEndpointFactory);

            watchdog = new Watchdog(ingestion.EnsureStarted, ingestion.EnsureStopped, ingestionState.ReportError,
                                    ingestionState.Clear, settings.TimeToRestartErrorIngestionAfterFailure, log, "failed message ingestion");
        }
Example #3
0
 public ImportFailedErrors(IDocumentStore store, ErrorIngestor errorIngestor, RawEndpointFactory rawEndpointFactory)
 {
     this.store              = store;
     this.errorIngestor      = errorIngestor;
     this.rawEndpointFactory = rawEndpointFactory;
 }
 public ImportFailedErrors(IDocumentStore store, ErrorIngestor errorIngestor)
 {
     this.store         = store;
     this.errorIngestor = errorIngestor;
 }
 public StartupTask(SatelliteImportFailuresHandler importFailuresHandler, ErrorIngestor errorIngestor, ErrorImporter importer)
 {
     importer.importFailuresHandler = importFailuresHandler;
     importer.errorIngestor         = errorIngestor;
 }