Value deserialization error: Method not found..
See original GitHub issueDescription
I am using consumer with schema registry to consume Avro data. I am using AvroDeserializer to desrialize the data. It was working fine and suddenly it started showing this error:
InnerException = {"Method not found: 'System.Threading.Tasks.Task
1<System.String> Confluent.SchemaRegistry.ISchemaRegistryClient.GetSchemaAsync(Int32)'."}
Message = “Local: Value deserialization error”
StackTrace = " at Confluent.Kafka.Consumer2.Consume(Int32 millisecondsTimeout)\r\n at Confluent.Kafka.Consumer
2.Consume(CancellationToken cancellationToken)\r\n `
This my consumer: ` using (var schemaRegistry = new CachedSchemaRegistryClient(schemaRegistryConfig)) using (var consumer = new ConsumerBuilder<string, Order>(consumerConfig) .SetValueDeserializer(new AvroDeserializer<Order>(schemaRegistry).AsSyncOverAsync()) .SetErrorHandler((_, e) => Console.WriteLine($“Error: {e.Reason}”)) .Build()) { consumer.Subscribe(“topic”);
try
{
while (true)
{
try
{
var consumeResult = consumer.Consume(cts.Token);
Console.WriteLine(consumeResult.Value.ToString());
}
catch (ConsumeException e)
{
Console.WriteLine($"Consume error: {e.Error.Reason}");
}
}
}
catch (OperationCanceledException)
{
consumer.Close();
}
}`
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top GitHub Comments
https://www.nuget.org/packages/Confluent.SchemaRegistry.Serdes.Avro/
Confluent.SchemaRegistry 1.4 and Confluent.SchemaRegistry.Serdes 1.3 are not compatible - the error you are seeing is expected.
@mhowlett Thanks, everything works fine now. I will close the issue since it is solved. Using
Confluent.SchemaRegistry.Serdes.Avro
insted ofConfluent.SchemaRegistry.Serdes
solved the problem.