Confluent-kafka-dotnet: .NET SchemaRegistry Protobuf support

Created on 2 Mar 2020  路  6Comments  路  Source: confluentinc/confluent-kafka-dotnet

Description

Protobuf support has been added to schema registry (to be released still, but in master)
https://github.com/confluentinc/schema-registry

It would be good to have protobuf serdes support in .net a once blocking issue that proto2 parts
(descriptors) could not be accessed, but this was resolved in proto 3.11+.

Also it would be good to have dynamicmessage as like in Java

How to reproduce

Checklist

Please provide the following information:

  • [ ] A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
  • [ ] Confluent.Kafka nuget version.
  • [ ] Apache Kafka version.
  • [ ] Client configuration.
  • [ ] Operating system.
  • [ ] Provide logs (with "debug" : "..." as necessary in configuration).
  • [ ] Provide broker log excerpts.
  • [ ] Critical issue.
question

Most helpful comment

Would be good though if possible at least to toggle (e.g. keep default as framed, but have the option to use headers). Else makes migration where we have existing protobuf flows very hard.

All 6 comments

protobuf support is already essentially fully functional here: https://github.com/mhowlett/confluent-kafka-dotnet/tree/json_proto_sr2

it'll be in the release after 1.4 (which adds transactions)

we're not doing dynamicmessage to start with at least.

@mhowlett thanks thats great news.

One more query, where we maybe sending protobuf in payload today. Is it possible that instead of framing (aka prepending the ids etc in the payload byte[]) possible to have a mode where payload is still just vanilla protobuf and the schema id etc are put in kafka headers.

Allowing an easier transition for those already just sending protobuf vanilla. E.g. i can start using the serializer today and not affect existing consumers and vice versa.

Same query prob applies to java variant also.

unfortunately not - this is dictated by schema registry.

there was a lengthy and very polarized internal discussion about this. the winning argument was essentially that having the metadata embedded is safer and easier to manage (no need to track 2 items everywhere).

Would be good though if possible at least to toggle (e.g. keep default as framed, but have the option to use headers). Else makes migration where we have existing protobuf flows very hard.

fyi: @rayokota

Is there any update on this? Having option to toggle putting schema id in header?

Was this page helpful?
0 / 5 - 0 ratings