schema-registry icon indicating copy to clipboard operation
schema-registry copied to clipboard

Define a property to deserialize as generic record when specific record class not found

Open emersonborges opened this issue 6 years ago • 10 comments

What was done:

  • A new boolean property was created SPECIFIC_AVRO_READER_UNKNOWN_AS_GENERIC_CONFIG. When is true, if SPECIFIC_AVRO_READER_CONFIG is enabled, it will deserialize as generic record if specific record class was not found.
  • Throwing an specific serialization exception class when specific record class not found ( SpecificRecordClassNotFound) to allow consumer to handle properly.

For more details: https://github.com/confluentinc/schema-registry/issues/791

emersonborges avatar Apr 29 '18 20:04 emersonborges

It looks like @emersonborges hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence. Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

ghost avatar Apr 29 '18 20:04 ghost

[clabot:check]

emersonborges avatar Apr 29 '18 20:04 emersonborges

It looks like @emersonborges hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence. Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

ghost avatar Apr 29 '18 20:04 ghost

[clabot:check]

emersonborges avatar Apr 29 '18 21:04 emersonborges

@confluentinc It looks like @emersonborges just signed our Contributor License Agreement. :+1:

Always at your service,

clabot

ghost avatar Apr 29 '18 21:04 ghost

@emersonborges Thanks a lot for the PR. I would like to understand a little bit more about the use-case/issue that you are trying to address here. Why would someone choose to configure to use a Specific Record but not have the appropriate class for it? This would help me take this PR forward.

mageshn avatar Oct 15 '18 16:10 mageshn

@emersonborges Just wanted to check to see if you had any updates on the question that I had regarding the context for this PR?

mageshn avatar Nov 08 '18 20:11 mageshn

Hello guys - any update on this bug? It is kind of blocker for us since it happens all the time that there are new events that consumer don't care about, and currently there is no easy way around this since AbstractKafkaAvroDeserializer uses some package protected classes so it can't be easily subclassed and overridden.

mawek avatar Dec 03 '18 20:12 mawek

Hi everyone. We have the same issue here: our consumer, who only cares about specific events, always breaks when new events are added to the topic. It would be a great improvement if we could configure the deserializer to return a generic record instead of throwing a generic serialization exception. Can I help somehow to develop that feature?

correacaio avatar Nov 18 '22 12:11 correacaio

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Sep 25 '23 16:09 cla-assistant[bot]