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

Resolving writer schema when subject name contains hyphens

Open arekgorecki opened this issue 5 years ago • 0 comments

I'm trying to read avro message from kafka where subject name is user-intake. I publish message with header: "contentType": "application/vnd.user-intake-value.v1+avro" (TopicNameStrategy) , but I'm getting org.apache.avro.AvroRuntimeException: Malformed data. Length is negative: -41 when reading it.

I have went through the code and it seems to me that the problem is caused by schema regex which doesn't allow any hyphens - link.

Am I doing something wrong here or is it the library which simply does not allow certain characters in the name of schema?

PS: I can provide additional information if the one above is not sufficient.

arekgorecki avatar Jun 16 '20 06:06 arekgorecki