confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
51 stars 857 forks source link

Question: Can SchemaRegistryConfig use local file .asvc ? #947

Open Gerappa92 opened 5 years ago

Gerappa92 commented 5 years ago

Description

I want to test how to use library to deserialization avro type files. I have an avro file locally on my computer. Can use this file?

How to reproduce

        var schemaRegistryConfig = new SchemaRegistryConfig
        {
            SchemaRegistryUrl = @"C:\Users\tester\source\repos\KafkaTest\KafkaTest\test.asvc",
            SchemaRegistryRequestTimeoutMs = 5000,
            SchemaRegistryMaxCachedSchemas = 10
        };
mhowlett commented 5 years ago

no, you'll need schema registry, or provide a custom implementation of ICachedSchameRegistry. I noticed the azure webjobs kafka extension has something like this (haven't looked closely), which you might find useful to look at: https://github.com/Azure/azure-functions-kafka-extension/blob/master/src/Microsoft.Azure.WebJobs.Extensions.Kafka/Serialization/LocalSchemaRegistry.cs