예제 #1
0
        private ParallelAirlockClient CreateAirlockClient()
        {
            var airlockConfig = new AirlockConfig
            {
                ApiKey                    = "UniversalApiKey",
                ClusterProvider           = new FixedClusterProvider(new Uri("http://vostok.dev.kontur.ru:6306")),
                SendPeriod                = TimeSpan.FromSeconds(2),
                SendPeriodCap             = TimeSpan.FromMinutes(5),
                RequestTimeout            = TimeSpan.FromSeconds(30),
                MaximumRecordSize         = 1.Kilobytes(),
                MaximumBatchSizeToSend    = 300.Megabytes(),
                MaximumMemoryConsumption  = 300.Megabytes(),
                InitialPooledBufferSize   = 10.Megabytes(),
                InitialPooledBuffersCount = 10,
                EnableTracing             = false
            };

            //return new AirlockClient(airlockConfig, log.FilterByLevel(LogLevel.Warn));
            return(new ParallelAirlockClient(airlockConfig, 10, log.FilterByLevel(LogLevel.Warn)));
        }
        private static ParallelAirlockClient CreateAirlockClient()
        {
            var airlockConfig = GetAirlockConfig();

            return(new ParallelAirlockClient(airlockConfig, 10, Log.FilterByLevel(LogLevel.Warn)));
        }