简体   繁体   中英

Deleted Shema for kafka topic

I've permanently deleted schema for kafka topic, Now I'm unable to deserialize messages from the topic, what should I do.

stack trace:

Internal Server Error
A 500 error has occurred: Request processing failed; nested exception is org.apache.kafka.common.errors.SerializationException: Error retrieving Avro schema for id 100869
Stack trace
org.apache.kafka.common.errors.SerializationException: Error retrieving Avro schema for id 100869 Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Schema 100869 not found; error code: 40403 at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:226) at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:252) at io.confluent.kafka.schemaregistry.client.rest.RestService.getId(RestService.java:482) at io.confluent.kafka.schemaregistry.client.rest.RestService.getId(RestService.java:475) at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getSchemaByIdFromRegistry(CachedSchemaRegistryClient.java:153) at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getBySubjectAndId(CachedSchemaRegistryClient.java:232) at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getById(CachedSchemaRegistryClient.java:211) at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.deserialize(AbstractKafkaAvroDeserializer.java:116) at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.deserialize(AbstractKafkaAvroDeserializer.java:88) at io.confluent.kafka.serializers.KafkaAvroDeserializer.deserialize(KafkaAvroDeserializer.java:55) at kafdrop.util.AvroMessageDeserializer.deserializeMessage(AvroMessageDeserializer.java:22) at kafdrop.service.KafkaHighLevelConsumer.deserialize(KafkaHighLevelConsumer.java:199) at kafdrop.service.KafkaHighLevelConsumer.lambda$getLatestRecords$3(KafkaHighLevelConsumer.java:132) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.ArrayList$SubList$2.forEachRemaining(ArrayList.java:1510) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at

If the schema is deleted, then that won't remove its ID from any existing messages in any topic.

You need to catch such consumer exceptions and ignore their deserialization, then seek/commit offsets past those events.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM