Git Product home page Git Product logo

Comments (6)

junrao avatar junrao commented on May 16, 2024

This is for the old producer. You can't just add a config since the same serializer class will be used for both key and value and you don't know which config is for which. We can potentially duplicate the code to two classes, one called KeyAvroSerializer and the other called ValueAvroSerializer. However, it's a bit confusing. Since (1) most use cases don't use key, (2) for cases when keys are used, they typically use primitive types, (3) we encourage people to use the new producer, we can just say, in the old producer, AvorSerializer should only by used for value. If key is used, use a primitive type such as int and string.

from schema-registry.

nehanarkhede avatar nehanarkhede commented on May 16, 2024

@junrao Overall, that's what I thought. However regarding the following -

(2) for cases when keys are used, they typically use primitive types, (3)

If they use keys with the old producer, the encoder still registers the schema under "subject"-value, which is incorrect

from schema-registry.

junrao avatar junrao commented on May 16, 2024

If they want to use keys in the old producer, they will just specify a primitive type encoder that won't go through schema registration.

from schema-registry.

nehanarkhede avatar nehanarkhede commented on May 16, 2024

@junrao I see, so we should cover this in the schema registry user documentation. I will keep this open so the patch can at least modify https://github.com/confluentinc/docs to include instructions for users of the old and new producer on usage of avro-serializers.

from schema-registry.

junrao avatar junrao commented on May 16, 2024

Yes, will add this to the documentation.

from schema-registry.

junrao avatar junrao commented on May 16, 2024

Updated the doc.

from schema-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.