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):
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):