示例#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;
 }