azure-functions-kafka-extension icon indicating copy to clipboard operation
azure-functions-kafka-extension copied to clipboard

Add Support to Trigger and Output Bindings for Schema Registry

Open bbejeck opened this issue 2 years ago • 0 comments

Since the function extension already supports Avro and Protobuf (de)serialization, it would be helpful to expose the following as optional configs for the KafkaTrigger and Kafka attributes.

  • schema.registry.basic.auth.credentials.source
  • schema.registry.basic.auth.user.info
  • schema.registry.url

Right now, to use Schema Registry (on Confluent Cloud, for example), the workaround is to declare KafkaEventData<string, byte[]> and deserialize when you iterate over the record payload. The same is true for the output binding. You need to serialize and place the byte[] in the IAsyncCollector<KafkaEventData<string, byte[]>> instance.

While the manual (de)serialization isn't particularly difficult to use, IMHO, it would be a great addition for users of the extension function that aren't experienced working with Kafka. Plus, the function extension abstracts a lot of the "ceremony" of working with Kafka, and this would reduce it even further.

bbejeck avatar Apr 08 '22 18:04 bbejeck