protected ConsumerWrapper(ILogger logger, KafkaOptions kafkaOptions, string groupId = null)
        {
            _logger  = logger;
            Consumer = new Consumer <string, string>(
                CreateConsumerConfig(kafkaOptions, groupId),
                new StringDeserializer(Encoding.UTF8),
                new StringDeserializer(Encoding.UTF8));

            Consumer.OnLog          += OnLog;
            Consumer.OnError        += OnError;
            Consumer.OnStatistics   += OnStatistics;
            Consumer.OnConsumeError += OnConsumeError;
        }
 public SimpleMessageReceiver(ILogger logger, KafkaOptions kafkaOptions, string groupId, IEnumerable <string> topics)
     : base(logger, kafkaOptions, groupId)
 {
     Consumer.Subscribe(topics);
 }
 public MessageReceiver(ILogger logger, KafkaOptions kafkaOptions, string groupId, IEnumerable <string> topics)
     : base(logger, kafkaOptions, groupId)
 {
     _topics = topics;
 }