I am trying to read the message from Kafka using consumer with the following properties
value.deserializer=io.confluent.kafka.serializers.KafkaAvroDeserializer
key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
specific.avro.reader=true
And the schema is
{
"type" : "array",
"items" : {
"type" : "record",
"name" : "MyDto",
"namespace" : "test.dto",
"fields" : [ {
"default" : null,
"name" : "version",
"type" : ["null","string"]
}, {
"default" : null,
"name" : "testName",
"type" : ["null","string"]
}, {
"name" : "keys",
"type" : {"type": "array", "items": "string"},
"java-class" : "java.util.List"
}]
},
"java-class" : "java.util.List"
}
The object was written to Kafka successfully using this schema. But on deserialization I am getting exception java.lang.NoSuchMethodException: java.util.List.<init>()
Is it possible to use java.util.List class? I am using confluent 3.1.2