KafkaAvroDeserializer properties reference

Review the following reference for a comprehensive list of the KafkaAvroDeserializer properties.

Property Name Description Type Default Value
schemaregistry.reader.schema.versions This is for setting which version of the schema should be used for which topic.1 Map<String, Integer> Empty map
specific.avro.reader If this is enabled, SpecificDatumReader will be used for deserialization. Boolean false
logical.type.conversion.enabled If this is enabled, Avro record fields that have logical types can be deserialized directly into their corresponding Java classes (BigDecimal, UUID, LocalDate, and so on). If not enabled, the record field will be deserialized as raw type, without handling the logical type. In this case, probably the same logical type related conversion will be needed to get a valid value. If specific.avro.reader is set to true, this does not have any effect. Boolean false
key_schema_version_id_header_name If the schema of the record key is stored in the header, the header name can be configured. String key.schema.version.id
value_schema_version_id_header_name If the schema of the record value is stored in the header, the header name can be configured. String value.schema.version.id

The KafkaAvroDeserializer contains an embedded SchemaRegistryClient. The configuration for SchemaRegistryClient should also be provided for the KafkaAvroDeserializer. For more information about configurable properties, see the Schema Registry Client properties reference documentation.

1 Example:
Map<String, Object> configs = new HashMap<>()
Map<String, Integer> readerVersions = new HashMap<>();
readerVersions.put("clicks", 2);
readerVersions.put("users", 1);
configs.put(“schemaregistry.reader.schema.versions”, readerVersions);