confluent-kafka-dotnet
confluent-kafka-dotnet copied to clipboard
Add interfaces to `ProducerBuilder` and `ConsumerBuilder`
Neither ConsumerBuilder
or ProducerBuilder
currently have an interface attached.
When testing code that relates to the configuration of a consumer, it's difficult without reflection to check whether configs or handlers have been set.
In my code I've used an adapter to add an interface. An example of where this would be helpful is here: https://github.com/deeja/KafkaConsumerRetry/blob/main/KafkaConsumerRetry.Tests/Factories/LocalConsumerBuilderTests/BuildConsumerShould.cs#L18-L31
An example of this the change is here: https://github.com/confluentinc/confluent-kafka-dotnet/compare/master...deeja:confluent-kafka-dotnet:consumer_builder_interface