Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KafkaConsumerClient"/> class.
 /// </summary>
 /// <param name="groupId">The group identifier.</param>
 /// <param name="options">The options.</param>
 /// <exception cref="ArgumentNullException">options</exception>
 public KafkaConsumerClient(string groupId, IOptions <KafkaOptions> options)
 {
     _groupId      = groupId;
     _kafkaOptions = options.Value ?? throw new ArgumentNullException(nameof(options));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="KafkaConsumerClientFactory"/> class.
 /// </summary>
 /// <param name="kafkaOptions">The kafka options.</param>
 public KafkaConsumerClientFactory(KafkaOptions kafkaOptions, ILogger <KafkaLog> logger)
 {
     _kafkaOptions = kafkaOptions;
     _logger       = logger ?? throw new System.ArgumentNullException(nameof(logger));
 }