2
Caused by: org.apache.kafka.common.errors.SerializationException: Error retrieving Avro schema for id 1
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401

コンフルエント バージョン 4.1.0

KTable を使用していくつかのトピック (topic_1、topic_2) からデータを消費し、データを結合してから、KStream を使用して別のトピック (topic_out) にデータをプッシュしています。(Ktable.toStream())

データは avro 形式です

を使用してスキーマを確認すると

curl -X GET http://localhost:8081/subjects/ 

私は見つける

topic_1-value
topic_1-key
topic_2-value
topic_2-key
topic_out-value

しかし、topic_out-key を持つサブジェクトはありません。なぜ作成されないのですか?

topic_out からの出力:

kafka-avro-console-consumer --bootstrap-server localhost:9092 --from-beginning --property print.key=true --topic topic_out

"code1  "   {"code":{"string":"code1  "},"personid":{"string":"=NA="},"agentoffice":{"string":"lic1        "},"status":{"string":"a"},"sourcesystem":{"string":"ILS"},"lastupdate":{"long":1527240990138}}

キーが生成されていることがわかりますが、キーのサブジェクトはありません。

サブジェクトとキーが必要なのはなぜですか?
このトピックを別のコネクタ (hdfs-sink) にフィードしてデータを hdfs にプッシュしていますが、以下のエラーで失敗します

Caused by: org.apache.kafka.common.errors.SerializationException: Error retrieving Avro schema for id 5\nCaused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401

schema-registry.logs を見ると、次のことがわかります。

[2018-05-24 15:40:06,230] INFO 127.0.0.1 - - 
[24/May/2018:15:40:06 +0530] "POST /subjects/topic_out-key?deleted=true HTTP/1.1" 404 51  9 (io.confluent.rest-utils.requests:77)

件名の topic_out-key が作成されていない理由は何ですか?

4

1 に答える 1