Преглед на файлове

Change Kafka BuildConsumer to return Consumer rather than set private _consumerClient (#990)

Co-authored-by: Unknown <email@example.co.uk>
master
Dan преди 3 години
committed by GitHub
родител
ревизия
42796c95b5
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. +3
    -3
      src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs

+ 3
- 3
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs Целия файл

@@ -153,7 +153,7 @@ namespace DotNetCore.CAP.Kafka
config.EnableAutoCommit ??= false;
config.LogConnectionClose ??= false;

BuildConsumer(config);
_consumerClient = BuildConsumer(config);
}
}
finally
@@ -162,9 +162,9 @@ namespace DotNetCore.CAP.Kafka
}
}

protected virtual void BuildConsumer(ConsumerConfig config)
protected virtual IConsumer<string, byte[]> BuildConsumer(ConsumerConfig config)
{
_consumerClient = new ConsumerBuilder<string, byte[]>(config)
return new ConsumerBuilder<string, byte[]>(config)
.SetErrorHandler(ConsumerClient_OnConsumeError)
.Build();
}


Зареждане…
Отказ
Запис