kmcclellan / kafka-di

An extension of Confluent's Kafka client for use with Microsoft.Extensions.DependencyInjection (and friends).
https://www.nuget.org/packages/Confluent.Kafka.DependencyInjection
MIT License
13 stars 5 forks source link

kafka-di is not compatible with Confluent 2.2.0 #12

Closed YQ-Xiong closed 1 year ago

YQ-Xiong commented 1 year ago

Hello! we have been using kafka-di for a while now, and we have been enjoying using this library.

When we upgrade Confluent to 2.2.0, we saw some error for kafka-di. We are using kafka-di 3.0.1 and confluent-kafka-dotnet 2.2.0 The error we are seeing is

Unhandled exception. System.TypeLoadException: Method 'IncrementalAlterConfigsAsync' in type 'Confluent.Kafka.DependencyInjection.ScopedAdminClient' from assembly 'Confluent.Kafka.DependencyInjection, Version=3.0.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at Confluent.Kafka.KafkaServiceCollectionExtensions.AddKafkaClient(IServiceCollection services)

After some research, we believe the error is caused by this recent commit for adding IncrementalAlterConfigs API (https://github.com/confluentinc/confluent-kafka-dotnet/pull/2005).

We look forward to the support of Confluent 2.2.0.

kmcclellan commented 1 year ago

Hi, thanks for your research and the report! Fixed by https://github.com/kmcclellan/kafka-di/commit/4d10a3376808833e99bbd3ac31a7ff1925920a43 in v3.1.0.