public ConsumerService(IKafkaService kafkaService, IRedisService redisService, ILogger <ConsumerService> logger) { _kafkaService = kafkaService; _redisService = redisService; _logger = logger; _logger.LogDebug("Background service constructor."); }
private CustomizationLogger CreateLoggerImplementation(string name) { var includeScopes = _includeScopes; IKafkaService kafkaService = _services.GetService <IKafkaService>(); return(new CustomizationLogger(name, null , includeScopes? _scopeProvider: null, _prix, _logStoreTopic, kafkaService)); }
public KafkaToElasticsearch(ILoggerFactory logFact, IConfiguration config , IElasticsearchService elasticsearch , IKafkaService kafkaService) { _logFact = logFact; _config = config; _elasticsearch = elasticsearch; _kafkaService = kafkaService; }
internal CustomizationLogger(string name, Func <string, LogLevel, bool> filter , IExternalScopeProvider scopeProvider, string prix, string logStoreTopic , IKafkaService kafkaService) { if (name == null) { throw new ArgumentNullException(nameof(name)); } _kafkaService = kafkaService; Name = name; Filter = filter ?? ((category, logLevel) => true); ScopeProvider = scopeProvider; _prix = prix; _logStoreTopic = logStoreTopic; Task.Run(() => { try { System.Diagnostics.Debug.WriteLine("kafka开始同步日志。"); foreach (var entityMess in blockColl.GetConsumingEnumerable()) { var task = _kafkaService.Producer(_logStoreTopic , entityMess.Id, entityMess); if (task == null) { throw new NullReferenceException("方法没有返回有效的task"); } //System.Diagnostics.Debug.WriteLine("即将执行kafka日志Producer"); var result = task.Result; //Console.WriteLine(_prix+"--"+ logBuilder.ToString()); } } catch (Exception ep) { System.Diagnostics.Debug.WriteLine("kafka同步出现问题,详细情况:{0}", ep.ToString()); blockColl.CompleteAdding(); } }); }
public CarController(ILogger <CarController> logger, IKafkaService kafkaService) { _logger = logger; this.kafkaService = kafkaService; }
public ValuesController(IKafkaService kafkaService, IZookeeperService zookeeperService) { _kafkaService = kafkaService; _zookeeperService = zookeeperService; }
public App(IKafkaService kafkaService) { this._kafkaService = kafkaService; }
public ValuesController(IKafkaService kafkaService, IConfiguration config) { _kafkaService = kafkaService; }
public Worker(ILogger <Worker> logger, IKafkaService kafkaService) { _logger = logger; _kafkaService = kafkaService; }
public ServiceConsumer(ILogger <ServiceConsumer> logger, IKafkaService kafkaService) { _logger = logger; _kafkaService = kafkaService; }
public CustomersController(ICustomerService customerService, IKafkaService kafkaService) { _customerService = customerService; _kafkaService = kafkaService; }
public CustomizationLogger(string name, Func <string, LogLevel, bool> filter , IExternalScopeProvider scopeProvider, bool includeScopes, string prix, string logStoreTopic, IKafkaService kafkaService) : this(name, filter, includeScopes ? new LoggerExternalScopeProvider() : null , prix, logStoreTopic, kafkaService) { }
public PessoaEventHandler(IKafkaService kafkaService) { _kafkaService = kafkaService; }
public FlightEventProducer(IKafkaService kafkaService, IMessageSerializer messageSerializer) { _kafkaService = kafkaService; _messageSerializer = messageSerializer; }
public ProduceController(IKafkaService service) { _service = service; }
public ProducerController(IConfiguration configuration, IKafkaService kafkaService) { _configuration = configuration; _kafkaService = kafkaService; }
public MessageController(IMessageService service, IKafkaService evenBusKafka, IUserConversationService userConversationService) { _service = service; _evenBusKafka = evenBusKafka; _userConversationService = userConversationService; }