ch-robinson / dotnet-avro

An Avro implementation for .NET
https://engineering.chrobinson.com/dotnet-avro/
MIT License
134 stars 49 forks source link

Method not found exception #229

Closed mihaimyh closed 1 year ago

mihaimyh commented 1 year ago

Updating Confluent.Kafka to version 1.9.3 there is an exception

Confluent.Kafka.ProduceException`2[Confluent.Kafka.Null,NightsWatch.Utils.Contracts.Models.WebServiceMessage]: Local: Value serialization error
 ---> System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Int32> Confluent.SchemaRegistry.ISchemaRegistryClient.RegisterSchemaAsync(System.String, Confluent.SchemaRegistry.Schema)'.
   at Chr.Avro.Confluent.AsyncSchemaRegistrySerializer`1.<SerializeAsync>b__29_0(String subject)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Chr.Avro.Confluent.AsyncSchemaRegistrySerializer`1.<SerializeAsync>b__29_0(String subject)
   at Chr.Avro.Confluent.AsyncSchemaRegistrySerializer`1.SerializeAsync(T data, SerializationContext context)
   at Confluent.Kafka.Producer`2.ProduceAsync(TopicPartition topicPartition, Message`2 message, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---

It seems this was introduced by https://github.com/confluentinc/confluent-kafka-dotnet/commit/7567e89322e0e4f11a4933dccd0b73362c1301e5 where the RegisterSchemaAsync method has been changed by adding a bool.

image

dstelljes commented 1 year ago

Thanks for the report! Chr.Avro 9.2.0 will target Confluent.SchemaRegistry >= 1.9.3.