Comments (6)
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.
@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.
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.
@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.
Yes, will add this to the documentation.
from schema-registry.
Updated the doc.
from schema-registry.
Related Issues (20)
- Propery "value.converter.ignore.default.for.nullables": "true" not work when use transforms HOT 1
- Lookup global schema id HOT 3
- Namespaced Schema Field for fixed logical type Decimal Fails
- More user-friendly JSON Schema compatibility checks HOT 1
- scrub.invalid.names has poor performance HOT 2
- Deprecated dependency jackson-datatype-guava
- Log spam "Error retrieving Avro schema"
- JAAS config for Oauthbearer configuration HOT 1
- Breaking change in 7.5.3 `ParsedSchema` `validate` method now requires boolean
- Unable to set "scrub.invalid.names" to "true" when using the JSONSchema Converter HOT 2
- Setting normalize=true fails to find existing schema HOT 2
- io.confluent:kafka-json-schema-serializer:7.5.1 includes 3 party library with critical vulnerability HOT 4
- Hard-deletion doesn't work for older schemas
- java.lang.NoSuchMethodException when using reactive Kafka + Avro + Spring Cloud Stream with GraalVM
- RestClientException: Empty schema, when using Spring Kafka + Protobuf with GraalVM HOT 4
- Vulnerabilities in Schema Registry 7.5.3 dependencies HOT 1
- schema-registry-start server - ClassNotFoundException
- High severity vulnerabilities CVE-2024-26308 and CVE-2024-25710 detected in schema-registry HOT 4
- [Bug] KafkaJsonSchemaSerializer adds initial null bytes (00 00 00 00 0C 7B) HOT 1
- Multiple replica of schema registry- one pod failed with "error_code":50005,"message":"Unrecognized token 'upstream': was expecting (JSON String, Number (or 'NaN'/'INF'/'+INF'), Array, Object or token 'null', 'true' or 'false')
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schema-registry.