Comments (4)
This is fixed by #2835
from schema-registry.
We experience a similar behaviour during serialization of kafka events with time related fields (java.time.*).
After setting the property spring.kafka.properties.avro.use.logical.type.converters=true
serialization in 7.5.2 works again the same way as in 7.5.1. I also agree with @roookeee that this change is not acceptable in a patch version release
from schema-registry.
We experience a similar behavour with Quarkus (SmallRye Reactive Messaging) and logical types, e.g. java.time.Instant
. Serialization with 7.5.2 works again if we set mp.messaging.outgoing.[channel].avro.use.logical.type.converters=true
, but we have to do this for each channel separately.
It would be nice to know if this was an unintentional change that will be reverted (so we can just skip this version) or if this behaviour is here to stay.
from schema-registry.
Same behaviour here. After upgrading to io.confluent:kafka-avro-serializer:7.5.2
or io.confluent:kafka-streams-avro-serde:7.5.2
on java.time.Instant
:
Caused by: org.apache.avro.AvroRuntimeException: Unknown datum type java.time.Instant: 2000-01-01T01:00:00Z
at org.apache.avro.generic.GenericData.getSchemaName(GenericData.java:947)
at org.apache.avro.specific.SpecificData.getSchemaName(SpecificData.java:440)
at org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:906)
at org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:307)
at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:157)
at org.apache.avro.specific.SpecificDatumWriter.writeField(SpecificDatumWriter.java:108)
at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:234)
at org.apache.avro.specific.SpecificDatumWriter.writeRecord(SpecificDatumWriter.java:92)
at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:145)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:95)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:82)
at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.writeDatum(AbstractKafkaAvroSerializer.java:192)
at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:162)
I am using the following dependencies directly:
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-streams-avro-serde</artifactId>
<version>${kafka-streams-avro-serde.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>${kafka-avro-serializer.version}</version>
</dependency>
Here are code samples to reproduce: https://github.com/loicgreffier/spring-boot-kafka-quickstarts
- See the opened PRs for the full stack traces for both dependencies
- The behaviour can be reproduced by upgrading the dependencies to
7.5.2
from schema-registry.
Related Issues (20)
- Schema registry client : No Authentication header appearing in http request HOT 1
- If the name contains a dot (.) in the name a newly created schema's name and namespaces are overridden. HOT 1
- SpringBoot reactor kafka NATIVE image fails with KafkaException: Could not find a public no-argument constructor for io.confluent.kafka.serializers.KafkaJsonSerializer
- CFK Schema Registry Basic Auth Vault Secret Auto-reload Failed
- Wrong metric value for `kafka_schema_registry_node_count_node_count`
- java.lang.NoClassDefFoundError: org/apache/commons/codec/Charsets HOT 1
- Breaking change in io.confluent:kafka-protobuf-serializer from 7.6.0 to 7.6.1 HOT 2
- Error deserializing AVRO - schema evolution example HOT 1
- AuthenticateCallbackHandler not supported with SASL_OAUTHBEARER_INHERIT credential source
- Nested json with JSONSchema value converter DataException: Invalid null value for required STRUCT field HOT 3
- Confluent Maven repository is responding HTTP 403 Forbidden HOT 2
- GET /schemas and its configs are undocumented
- Vulnerabilities in Schema Registry 7.6.1 dependencies
- If you miss SCHEMA_REGISTRY_SCHEMA_REGISTRY_GROUP_ID in the image configuration you get into big problems HOT 1
- Issue with creating Schema Registry object: "Register operation timed out; error code: 50002"
- BACKWARD Compatibility Type does not support add optional field HOT 3
- Schema Registry configuration provided through key/value converter in a connector are not substituted by a ConfigProvider
- errorType:'READER_FIELD_MISSING_DEFAULT_VALUE' while checking compatibility
- KafkaJsonSchemaSerializer configuration can be silently overwritten due to static ObjectMapper
- Serialization with SpecificRecord and avro.use.logical.type.converters=true and use.latest.version=true is broken for union topic schema HOT 1
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.