confluentinc / confluentinc/examples

[clients/avro] Avro ReflectData example

Open
#62 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Sometimes Java classes can be complex. For example, you want a Date/Instant object, but then Avro doesn't have a date type, so it should actually be encoded as a long. Rather than having Producer & Consumer application logic to handle that conversion, it can be done by Encoders in the Reflection API

Provide example for [ReflectData](https://avro.apache.org/docs/1.8.2/api/java/index.html?org/apache/avro/reflect/ReflectData.html), which are subclasses of SpecificRecords, and are easier to migrate existing Jackson/Gson POJOs into this model rather than write up an Avro schema

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.