Support Questions

Find answers, ask questions, and share your expertise

NIFI: Unable to post AVRO message to kafka topic using Confluence Schema Registry service

avatar
New Contributor



Hi community,

Our NIFI version: 1.23.0.
We are converting JSON message to AVRO format and posting to KAFKA topic using  

PublishKafkaRecord_2_0 1.23.0:

MariaE_1-1743715964058.png

JSON Tree Reader:

MariaE_2-1743716067759.png

AVRO Record Set Writer:

MariaE_3-1743716152859.png

Confluent Schema Registry:

MariaE_4-1743716323603.png

We are not able to post  the message with the error below.
We are able to see the AVRO schema in the KAFKA registry through POSTMAN and using browser URL and we are able to connect to that KAFKA topic with the same parameters in NIFI .

Could you please help us to resolve this issue.

Error:

MariaE_0-1743715638831.png

 

1 ACCEPTED SOLUTION

avatar
Master Mentor

@MariaE 

It sounds like from the shared exception the data coming from your source json did not match the schema returned from "zv60-u-ab-...".  Looks like the data had a null value in the channel field but the schema does not support null values.   

So either an  issue with the source data or the schema needs to be modified to support null values. 

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@MariaE 

It sounds like from the shared exception the data coming from your source json did not match the schema returned from "zv60-u-ab-...".  Looks like the data had a null value in the channel field but the schema does not support null values.   

So either an  issue with the source data or the schema needs to be modified to support null values. 

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
New Contributor

Hi Matt, 
yes it was the case of null values - we updated avro schema and set default values for enums and were able to connect and post messages to kafka.
Thanks