0

Manually registered schema in SchemaRegistry using curl command. Schema registered is:

'{ "schema": "{ \"type\": \"record\", \"name\": \"Person\", \"namespace\": \"com.xxx\", \"fields\": [ { \"name\": \"firstName\", \"type\": \"string\" }, { \"name\": \"lastName\", \"type\": \"string\" }, { \"name\": \"age\", \"type\": \"long\" } ]}" }'

Created code in .Net refering to link https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/examples/JsonSerialization/Program.cs but having below error:

One or more errors occurred. (Local: Value serialization error)

The JSON schema corresponding to the written data:
{"type":"record","name":"Person","namespace":"com.xxx","fields":[{"name":"firstName","type":"string"},{"name":"lastName","type":"string"},{"name":"age","type":"long"}]}
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Padmaraj
  • 1
  • 1
  • According to your curl command, you've uploaded an Avro schema, not a JSON schema (you're missing a schemaType field.. Also, producer will automatically register the schema for you, so unclear why you needed to do so manually – OneCricketeer Jun 25 '22 at 06:45
  • @OneCricketeer, as per your suggestion removed manual update of schema and auto registered schema from code. But while updating schema change it is returning Value Serialization error for just adding one new property. – Padmaraj Jul 05 '22 at 13:07

0 Answers0