internal static KafkaFailoverSink Create(KafkaSink kafkaSink, ILogEventSink fallbackSink, BatchOptions batchOptions, TimeSpan fallback) => batchOptions.QueueLimit.HasValue ? new KafkaFailoverSink(kafkaSink, fallbackSink, batchOptions.BatchSizeLimit, batchOptions.Period, batchOptions.QueueLimit.Value, fallback) : new KafkaFailoverSink(kafkaSink, fallbackSink, batchOptions.BatchSizeLimit, batchOptions.Period, fallback);
internal static KafkaFailoverSink Create(KafkaSink kafkaSink, ILogEventSink fallbackSink, BatchOptions batchOptions, IModeSwitcher modeSwitcher) => batchOptions.QueueLimit.HasValue ? new KafkaFailoverSink(kafkaSink, fallbackSink, batchOptions.BatchSizeLimit, batchOptions.Period, batchOptions.QueueLimit.Value, modeSwitcher) : new KafkaFailoverSink(kafkaSink, fallbackSink, batchOptions.BatchSizeLimit, batchOptions.Period, modeSwitcher);
private KafkaFailoverSink(KafkaSink kafkaSink, ILogEventSink fallbackSink, int batchSizeLimit, TimeSpan period, int queueLimit, IModeSwitcher modeSwitcher) : base(batchSizeLimit, period, queueLimit) { _kafkaSink = kafkaSink; _fallbackSink = fallbackSink; _switcher = modeSwitcher; }
private KafkaFailoverSink(KafkaSink kafkaSink, ILogEventSink fallbackSink, int batchSizeLimit, TimeSpan period, int queueLimit, TimeSpan fallback) : this(kafkaSink, fallbackSink, batchSizeLimit, period, queueLimit, new ModeSwitcher(fallback)) { }