public void Dispose() { _innerConsumer?.Close(); _innerConsumer?.Dispose(); _innerConsumer = null; }
/// <summary> /// Kafka event consumer constructor. /// </summary> /// <param name="consumer">Kafka consumer.</param> /// <param name="logger">Logger.</param> public KafkaEventConsumer(Confluent.Kafka.IConsumer <TKey, TValue> consumer, ILogger logger = null) { this.consumer = consumer; this.logger = logger; }
public InnerConsumerWrapper(Confluent.Kafka.ConsumerConfig config, CancellationToken cancellationToken, ILogger logger) { _innerConsumer = BuildConfluentConsumer(config); _cancellationToken = cancellationToken; _logger = logger; }
private void InitInnerConsumer() { _innerConsumer = BuildConfluentConsumer(); Subscribe(); }
private void DisposeInnerConsumer() { _innerConsumer?.Close(); _innerConsumer?.Dispose(); _innerConsumer = null; }