簡體   English   中英

分支到多個主題時的 Kafka Streams 架構問題

[英]Kafka Streams Schema Issue when Branching to Multiple Topics

我有一個應用程序,它根據一些規則分支到 20 個主題之一。 它因以下錯誤而開始失敗。

stream-thread [pbel-topic-splitter-bc7189fd-e35c-454d-b5e7-97d5e514dc36-StreamThread-1] Failed to process stream task 0_14 due to the following error:
org.apache.kafka.streams.errors.StreamsException: Exception caught in process. taskId=0_14, processor=KSTREAM-SOURCE-0000000000, topic=com.bns.prm. raw.DETAIL, partition=14, offset=334
        at org.apache.kafka.streams.processor.internals.StreamTask.process(StreamTask.java:367)
        at org.apache.kafka.streams.processor.internals.AssignedStreamsTasks.process(AssignedStreamsTasks.java:104)
        at org.apache.kafka.streams.processor.internals.TaskManager.process(TaskManager.java:413)
        at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:862)
        at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:777)
        at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:747)
Caused by: org.apache.kafka.common.errors.SerializationException: Error registering Avro schema: {"type":"record","name":"DETAIL","namespace":"com.        bns.eventlayer.prm.avro","fields":[{"name":"isb_IDENTITY_NUMBER","type":"long"},{"name":"ND_TRAN_ID","type":["null","long"],"default":null},{"name"        :"D nnect.data.Timestamp","logicalType":"timestamp-millis"}}],"connect.name":"com.bns.eventlayer.prm.avro.DETAIL"}
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Schema being registered is incompatible with an earlier schema; error code: 409
        at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:209)

我比較了這兩種模式,發現了這種微妙的差異,不確定這是否重要......

{
         "name":"SD_ACH_BATCH_OFFSET_TYP",
         "type":[
            "null",
            "string"
         ],
         "default":null
      }

      {
         "name":"SD_SECURITY_LEVEL",
         "type":[
            "null",
            {
               "type":"string",
               "avro.java.string":"String"
            }
         ],
         "default":null
      },

這是我的錯誤,我必須清除錯誤主題的舊模式。 編寫了一個程序來尋找總是崩潰的偏移量(DLQ),讀取 DLQ 的數據並找出它的錯誤主題......

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM