0
votes

I produce the same Avro schema to one topic use different Confluent Registry sources. I get the error when I consume this topic:

org.apache.kafka.common.errors.SerializationException: Error deserializing key/value for partition XXXXX_XXXX_XXX-0 at offset 0. If needed, please seek past the record to continue consumption.

Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id 7

Caused by: org.apache.kafka.common.errors.SerializationException: Could not find class XXXXX_XXXX_XXX specified in writer's schema whilst finding reader's schema for a SpecificRecord.

How to ignore differently Avro message-id?


Schema:

 {
      "type": "record",
      "name": "XXXXX_XXXX_XXX",
      "namespace": "aa.bb.cc.dd",
      "fields": [
        {
          "name": "ACTION",
          "type": [
            "null",
            "string"
          ],
          "default":null,
          "doc":"action"
        },
        {
          "name": "EMAIL",
          "type": [
            "null",
            "string"
          ],
          "default":null,
          "doc":"email address"
        }
      ]
    }

Produced command

{"Action": "A", "EMAIL": "[email protected]"}
1
Can you share the schema and the commands of producing and consuming the data produced for the topic ?Fatema Khuzaima Sagar

1 Answers

0
votes

It's not possible to use different Registry urls in a producer and be able to consume them consistently.

The reason is that a different ID will be placed in the topic.

The Schema ID lookup cannot be skipped

If you had the used same registry, the same schema payload would always generate the same ID, which the consumer would then be able to use consistently to read messages