- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
PublishKafkaRecord_2_6 with JsonRecordSetWriter
- Labels:
-
Apache Kafka
-
Apache NiFi
-
Schema Registry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created 01-15-2021 06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It may be helpful if you can share screenshots of your controller services (JsonTreeReader and JsonRecordSetWriter complete configurations) and the complete exception written to the nifi-app.log.
