コード例 #1
0
 public KafkaProducer(IConfiguration configuration, ILogger <KafkaProducer> logger,
                      IConfigUtil configUtil, ICustomPartitioner customPartitioner)
 {
     this._configuration     = configuration;
     this._logger            = logger;
     this._configUtil        = configUtil;
     this._producer          = null;
     this._customPartitioner = customPartitioner;
     initProducer();
     _logger.LogInformation("Constructor called");
 }
コード例 #2
0
 public KafkaConsumer(ILogger <KafkaConsumer> logger,
                      IConfiguration configuration,
                      IConfigUtil configUtil,
                      ISynchronzationUtil synchronzationUtil,
                      IMurmurHashUtil murmurHashUtil)
 {
     this._logger             = logger;
     this._configuration      = configuration;
     this._configUtil         = configUtil;
     this._synchronzationUtil = synchronzationUtil;
     this._murmurHashUtil     = murmurHashUtil;
     _topicName = _configuration["ConfigProperties:Kafka:ResponseTopicName"];
     EnsureConsumer();
     _logger.LogInformation("Constructor called");
 }
コード例 #3
0
 public ConfigOperator(IConfigUtil configUtil)
 {
     _configUtil    = configUtil;
     _configDirPath = ConfigFileUtil.GetConfigDirPath();
     _configFile    = ConfigFileUtil.GetConfigFile();
 }