public LinkerService(ILinkerConnectionBuilder originBuilder, ILinkerConnectionBuilder destinationBuilder,
                             IPositionRepository positionRepository, IFilterService filterService, Settings settings, ILinkerLogger logger)
        {
            Ensure.NotNull(originBuilder, nameof(originBuilder));
            Ensure.NotNull(destinationBuilder, nameof(destinationBuilder));
            Ensure.NotNull(positionRepository, nameof(positionRepository));

            _logger = logger;
            Name    = $"Replica From-{originBuilder.ConnectionName}-To-{destinationBuilder.ConnectionName}";
            _connectionBuilderForOrigin      = originBuilder;
            _connectionBuilderForDestination = destinationBuilder;
            _positionRepository = positionRepository;
            _filterService      = filterService;
            _handleConflicts    = settings.HandleConflicts;
            _resolveLinkTos     = settings.ResolveLinkTos;

            _timerForStats          = new Timer(settings.StatsInterval);
            _timerForStats.Elapsed += _timerForStats_Elapsed;

            _processor          = new Timer(settings.SynchronisationInterval);
            _processor.Elapsed += Processor_Elapsed;
            _perfTunedSettings  =
                new PerfTuneSettings(settings.MaxBufferSize, settings.MaxLiveQueue, settings.ReadBatchSize);
            _replicaHelper = new LinkerHelper();
        }
 public LinkerService(ILinkerConnectionBuilder originBuilder, ILinkerConnectionBuilder destinationBuilder,
                      IFilterService filterService, Settings settings, ILinkerLogger logger) : this(
         originBuilder, destinationBuilder, new PositionRepository($"PositionStream-{destinationBuilder.ConnectionName}",
                                                                   "PositionUpdated", destinationBuilder.Build), filterService, settings, logger)
 {
 }