I am writing Java Avro Producer code for my project. I have registered an Avro schema for all the fields which need to be passed.
My Registered Schema-
{
"name": "Claim",
"type": "record",
"namespace": "com.schema.avro",
"fields": [
{
"name": "icn",
"type": "string"
},
{
"name": "fln,
"type": "int"
},
]
}
I am using "icn" field value as a key but I don't have a key schema registered separately. I am not sure if that is required.
i) Can I directly use a field already in my current schema("icn" in this case) as the key without having to register a key schema?
ii) Do I need to register the key schema separately? If so, is that part of the schema already created for fields or is it different?