A specific record is a generated, strongly typed object whose structure follows a known Avro schema. Unlike GenericRecord, it is aware of its fields and exposes direct accessors. section 3.2.9
Use the two record forms differently:
- Check a GenericRecord with hasField before retrieving schema-named fields through get. section 3.2.9
Generating and consuming an Avro record
Generate Java classes from registered schemas, construct an AvengerAvro object with its builder, and configure KafkaAvroDeserializer with SPECIFIC_AVRO_READER_CONFIG=true. The consumer then returns the generated specific type rather than GenericRecord.
