azure-functions-kafka-extension
azure-functions-kafka-extension copied to clipboard
Avro deserialization using dotnet out-of-process execution model
Hi, when using the out-of-process execution model we are referencing the Microsoft.Azure.Functions.Worker.Extensions.Kafka NuGet package, as outlined by this sample project file.
The problem is that all the Avro deserialization capabilities described in the README seems to not be available by following this route, because the corresponding types/assemblies are not referenced. If we go with the in-process model, we are referencing the Microsoft.Azure.WebJobs.Extensions.Kafka NuGet package which has all that we need for the Avro deserialization.


Is this really the case? If so, don't you think that it would be helpful to highlight in the docs the fact that we are losing quite a bit of functionality by going with the out-of-process execution model?
Thanks.
Hi @undrivendev, Microsoft.Azure.Functions.Worker.Extensions.Kafka NuGet internally uses this project. If you build the dotnet out-of-proc function app, you will be able to see all Confluent dlls inside .azurefunctions folder.
Hi @krishna-kariya, thanks for your reply, but it doesn't answer the question unfortunately.
Let me explain it more clearly.
If I run the example from here when using the out-of-process execution model, the code doesn't compile.
That's because the out-of-process Azure Functions Kafka extensions NuGet package does not include the necessary classes/interfaces like ISpecificRecord or GenericRecord.
So, how can I run that example by using the out-of-process execution model?
Thanks.
Hi @krishna-kariya, thanks for your reply, but it doesn't answer the question unfortunately.
Let me explain it more clearly.
If I run the example from here when using the out-of-process execution model, the code doesn't compile.
That's because the out-of-process Azure Functions Kafka extensions NuGet package does not include the necessary classes/interfaces like
ISpecificRecordorGenericRecord.So, how can I run that example by using the out-of-process execution model?
Thanks.
For dotnet worker we don't supports ISpecificRecord, we only support the GenericRecord.
Hi @shrohilla , thanks for the reply.
The Microsoft.Azure.Functions.Worker.Extensions.Kafka package only depends on Microsoft.Azure.Functions.Worker.Extensions.Abstractions.
In order to use the GenericRecord class there should be also reference to Apache.Avro in the dependency graph, and there's not.
It seems that you don't support it.
Or am I missing something?
Thanks.
@undrivendev we don't support it directly, you need to specify your schema in AvroSchema attribute of the KafkaTrigger annotation. You will receive the object in serialized string not in GenericRecord. Kafka Extension take care of deserialization.
For reference you can see this e.g. of Java
@undrivendev I hope this issue is resolved, feel free to reach out, closing this issue for now.