我已经创建了一个接收器连接器来开始从死信队列中使用。但是它显示了schema not found异常,如下所示:
Caused by: org.apache.kafka.common.errors.SerializationException: Error retrieving Avro key schema version for id 103925
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Schema not found; error code: 40403
at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:295)
at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:355)
at io.confluent.kafka.schemaregistry.client.rest.RestService.lookUpSubjectVersion(RestService.java:440)
at io.confluent.kafka.schemaregistry.client.rest.RestService.lookUpSubjectVersion(RestService.java:427)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getVersionFromRegistry(CachedSchemaRegistryClient.java:236)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getVersion(CachedSchemaRegistryClient.java:364)
at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.schemaVersion(AbstractKafkaAvroDeserializer.java:116)
at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.deserializeWithSchemaAndVersion(AbstractKafkaAvroDeserializer.java:158)
但是消息可以用kafkaui来查看,比如kafdrop。他们是如何反序列化这些消息的
1条答案
按热度按时间xwmevbvl1#
请注意错误中显示的**
key
**模式。验证DLQ中的记录是否实际序列化为Avro,如果不是,则不要使用
key.converter=...AvroConverter
不清楚您在Kafdrop中看到了什么,但是Avro键通常不用于JDBC接收器,例如,您可能只看到了记录的值。或者,Connect失去了与注册表的连接,因此它查找
id 103925
失败(您的注册表中真的有超过10万个唯一模式吗?您是否尝试过直接使用Registry REST API来查看该ID是否真的存在?如果是,它是否描述了您的DLQ记录的数据?)