Пример #1
0
 public KafkaConsumerClient(string groupId, IOptions <KafkaOptions> options)
 {
     _groupId      = groupId;
     _kafkaOptions = options.Value ?? throw new ArgumentNullException(nameof(options));
 }
Пример #2
0
 private static Func <Producer> CreateActivator(KafkaOptions options)
 {
     return(() => new Producer(options.AsKafkaConfig()));
 }
Пример #3
0
 public KafkaConsumerClient(string groupId, KafkaOptions options)
 {
     _groupId           = groupId;
     _kafkaOptions      = options ?? throw new ArgumentNullException(nameof(options));
     StringDeserializer = new StringDeserializer(Encoding.UTF8);
 }
Пример #4
0
 public ConnectionPool(KafkaOptions options)
 {
     _maxSize   = options.ConnectionPoolSize;
     _activator = CreateActivator(options);
 }
Пример #5
0
 public KafkaConsumerClientFactory(KafkaOptions kafkaOptions)
 {
     _kafkaOptions = kafkaOptions;
 }
Пример #6
0
 public KafkaConsumerClient(string groupId, KafkaOptions options)
 {
     _groupId           = groupId;
     _kafkaOptions      = options;
     StringDeserializer = new StringDeserializer(Encoding.UTF8);
 }
Пример #7
0
 public KafkaConsumerClientFactory(IOptions <KafkaOptions> kafkaOptions)
 {
     _kafkaOptions = kafkaOptions.Value;
 }