Member since
01-12-2021
1
Post
0
Kudos Received
0
Solutions
01-14-2021
09:19 AM
In Apache NiFi, I am currently using PublishKafkaRecord_2_6 to write JSON data to a Kafka topic. I am using the JsonRecordSetWriter for the Record Writer, and I would like to use the "Confluent Schema Registry Reference" as the Schema Write Strategy(I have also set the JSON schema in the Kafka topic):
Current settings for PublishKafkaRecord_2_6:
Record Reader: JsonTreeReader
Schema Access Strategy: Infer Schema
Record Writer: JsonRecordSetWriter
Schema Write Strategy: Confluent Schema Registry Reference
Schema Access Strategy: Use 'Schema Name' Property
Schema Registry: ConfluentSchemaRegistry
Schema Name: test-topic-name
but I get the following error:
PublishKafkaRecord_2_6 Failed to send StandardFlowFileRecord to Kafka: org.apache.nifi.processor.exception.ProcessException: org.apache.nifi.schema.access.SchemaNotFoundException: Could not retrieve schema with name 'test-topic-name' from the configured Schema Registry.
I have also tried setting Schema Name to 'test-topic-name-value' and 'value_test-topic-name' and have gotten a similar error.
It is also worth noting that when I tried to use PublishKafkaRecord_2_6 with the JsonTreeReader and AvroRecordSetWriter with the following settings, I had no issues(I also set the Avro schema for the Kafka topic beforehand):
Record Reader: JsonTreeReader
Schema Access Strategy: Infer Schema
Record Writer: AvroRecordSetWriter
Schema Write Strategy: Confluent Schema Registry Reference
Schema Access Strategy: Use 'Schema Name' Property
Schema Registry: ConfluentSchemaRegistry
Schema Name: test-topic-name-value
Is there a way to configure the JsonRecordSetWriter so that it will use the "Confluent Schema Registry Reference" as the Schema Write Strategy?
... View more
Labels:
- Labels:
-
Apache Kafka
-
Apache NiFi
-
Schema Registry