public RemoveCartController(IProductCache productCache, IKafkaLogger kafkaLogger, IHostCache hostCache, IOptions <ScriptAPISetting> options) { _kafkaLogger = kafkaLogger; _hostCache = hostCache; _productCache = productCache; _configurations = options.Value; }
public KafkaConsumer( KafkaConsumerConfiguration configuration, IKafkaDeserializerFactory deserializerFactory, IKafkaLogger <KafkaConsumer <TKey, TValue> > logger) : this(new ConsumerBuilderWrapper <TKey, TValue>(configuration, logger), configuration, deserializerFactory, logger) { }
public BuyCartController(IHostScriptChecker hostScriptChecker, IProductCache productCache, IKafkaLogger kafkaLogger, IErrorLogger errorLogger, IOptions <ScriptAPISetting> options, IHostCache hostDictionary) { _kafkaLogger = kafkaLogger; _configurations = options.Value; _hostScriptChecker = hostScriptChecker; _productCache = productCache; _errorLogger = errorLogger; _hostDictionary = hostDictionary; }
public FavController(IProductCache productCache, IHostScriptChecker hostScriptChecker, IKafkaLogger kafkaLogger, IHostCache hostCache, IErrorLogger errorLogger, IOptions <ScriptAPISetting> options) { _kafkaLogger = kafkaLogger; _hostScriptChecker = hostScriptChecker; _configurations = options.Value; _hostCache = hostCache; _productCache = productCache; _errorLogger = errorLogger; }
public PageLoggerController(IOptions <ScriptAPISetting> conf, IHostScriptChecker hostScriptChecker, IKafkaLogger kafkaLogger, IErrorLogger errorLogger, ICrowlerCache crowlerCache, IHostCache hostDictionary, ITotalVisitUpdater totalVisitUpdater) { _kafkaLogger = kafkaLogger; _hostCache = hostDictionary; _hostScriptChecker = hostScriptChecker; _crowlerCache = crowlerCache; _errorLogger = errorLogger; _totalVisitUpdater = totalVisitUpdater; _configurations = conf.Value; }
public AdToCartController(IOptions <ScriptAPISetting> conf, IHostScriptChecker hostScriptChecker, IKafkaLogger kafkaLogger, IProductCache productCache, IErrorLogger errorLogger, ITotalVisitUpdater totalVisitUpdater, IHostCache hostCache) { _kafkaLogger = kafkaLogger; _errorLogger = errorLogger; _hostScriptChecker = hostScriptChecker; _hostCache = hostCache; _productCache = productCache; _totalVisitUpdater = totalVisitUpdater; _configurations = conf.Value; }
internal KafkaConsumer( IConsumerBuilderWrapper <TKey, TValue> consumerBuilder, KafkaConsumerConfiguration configuration, IKafkaDeserializerFactory deserializerFactory, IKafkaLogger <KafkaConsumer <TKey, TValue> > logger) { _configuration = configuration; _logger = logger; consumerBuilder.SetValueDeserializer(deserializerFactory.GetValueDeserializer <TValue>()); _consumer = consumerBuilder.Build(); }
public KafkaProducerConnection(KafkaBrokerConfiguration configuration, IKafkaLogger <KafkaProducerConnection> logger) { var producerLogger = new ProducerLogger(logger); _producer = new ProducerBuilder <byte[], byte[]>( new ProducerConfig { BootstrapServers = configuration.BootstrapServers, }) .SetLogHandler(producerLogger.LogMessage) .Build(); }
public ProductUpdateController(IHostCache hostCache, IHostScriptChecker hostScriptChecker, IProductCache productCache, ICrowlerCache crowlerCache, IKafkaLogger kafkaLogger, ICategoryLogger categoryLogger, IErrorLogger errorLogger, IOptions <ScriptAPISetting> options, ITotalVisitUpdater totalVisitUpdater) { _kafkaLogger = kafkaLogger; _categoryLogger = categoryLogger; _hostScriptChecker = hostScriptChecker; _productCache = productCache; _errorLogger = errorLogger; _crowlerCache = crowlerCache; _configurations = options.Value; _hostCache = hostCache; _totalVisitUpdater = totalVisitUpdater; }
public ConsumerBuilderWrapper( KafkaConsumerConfiguration configuration, IKafkaLogger <KafkaConsumer <TKey, TValue> > logger) { var consumerLogger = new ConsumerLogger <TKey, TValue>(logger); var consumerConfig = new ConsumerConfig { BootstrapServers = configuration.BootstrapServers, GroupId = configuration.GroupId, EnableAutoCommit = true, EnablePartitionEof = true, }; if (configuration.StartAtEarliestOffset) { consumerConfig.AutoOffsetReset = AutoOffsetReset.Earliest; } _builder = new ConsumerBuilder <TKey, TValue>(consumerConfig).SetLogHandler(consumerLogger.Log); }
public ConsumerLogger(IKafkaLogger <KafkaConsumer <TKey, TValue> > logger) { _logger = logger; }
public KafkaLoggerWrapper(KafkaLoggerFactory loggerFactory) { _logger = loggerFactory.GetLogger <T>(); }
public KafkaLogMidleware(RequestDelegate next, IKafkaLogger kafkaLogger) { _kafkaLogger = kafkaLogger; _next = next; }
public ProducerLogger(IKafkaLogger <KafkaProducerConnection> logger) { _logger = logger; }
internal static void Log <T>(this IKafkaLogger <T> logger, LogMessage logMessage) { var level = (LogLevel)((int)logMessage.Level); logger.Log(level, logMessage.Message, logMessage.Name, logMessage.Facility); }
public LogHandler(IKafkaLogger logger) { _logger = logger; }