Apache kafka 卡夫卡流:在写入另一个主题时,有没有办法忽略主题分区中的特定偏移

Apache kafka 卡夫卡流:在写入另一个主题时,有没有办法忽略主题分区中的特定偏移,apache-kafka,apache-kafka-streams,apache-kafka-connect,Apache Kafka,Apache Kafka Streams,Apache Kafka Connect,背景:我在制作to prod主题时使用了错误的avro模式注册表,结果kafka连接因模式id错误的消息而中断。因此,作为恢复计划,我们希望将prod主题中的消息复制到测试主题,然后将好消息写入hdfs。但我们面临某些偏移量的问题在从prod主题读取时具有错误的架构id。是否有方法在写入另一个主题时忽略此类偏移 Exception in thread "StreamThread-1" org.apache.kafka.streams.errors.StreamsException: Fai

背景:我在制作to prod主题时使用了错误的avro模式注册表,结果kafka连接因模式id错误的消息而中断。因此,作为恢复计划,我们希望将prod主题中的消息复制到测试主题,然后将好消息写入hdfs。但我们面临某些偏移量的问题在从prod主题读取时具有错误的架构id。是否有方法在写入另一个主题时忽略此类偏移

 Exception in thread "StreamThread-1" 
 org.apache.kafka.streams.errors.StreamsException: Failed to deserialize value 
 for record. topic=xxxx, partition=9, offset=1259032
  Caused by: org.apache.kafka.common.errors.SerializationException: Error 
  retrieving Avro schema for id 600
  Caused by: 

  io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: 
   Schema not found io.confluent.rest.exceptions.RestNotFoundException: Schema not found
  io.confluent.rest.exceptions.RestNotFoundException: Schema not found

{code}

您可以更改反序列化异常处理程序以跳过这些记录,如文档中所述:

也就是说,您可以通过参数
default.deserialization.exception.handler
在配置中设置
LogAndContinueExceptionHandler