Hi all

My schema is:



{
  "fields": [

    {
      "name": "ID",

      "type": "long"

    },

    {
      "name": "Group",

      "type": [

        "null",

        {
          "avro.java.string": "String",

          "type": "string"

        }

      ]

    },

    {
      "name": "Key",

      "type": [

        "null",

        {
          "avro.java.string": "String",

          "type": "string"

        }

      ]

    },

    {
      "name": "Value",

      "type": [

        "null",

        {
          "avro.java.string": "String",

          "type": "string"

        }

      ]

    }

  ],

  "name": "Runconfig",

  "namespace": "com.ns.vishnu.kafkaavorest.Model",

  "type": "record"

}





My Data is:

Runconfig rc = Runconfig.newBuilder()
        .setID(1L)
        .setGroup("new")
        .setKey("year")
        .setValue("11")
        .build();



runTemlate.send(“n-run”,rc);





Exception will be: org.apache.kafka.common.InvalidRecordException: This
record has failed the validation on broker and hence be rejected.





What is the validation mistake in this ?

I checked  every datatype it is correct only!!

Any suggestions on this !!

Reply via email to