Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi PublishKafka_0_10 processor

avatar
Expert Contributor

Hi,

I am trying to publish to a kafka topic on a kafka broker. I am receving the error such as

27513-kafka2.png

relationship not specified; rolling back session: {}
org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=be3d1509-fdc4-4235-a760-c8740a05883b,claim=,offset=0,,size=0] transfer relationship not specified
       at org.apache.nifi.controller.repository.StandardProcessSession.checkpoint(StandardProcessSession.java:248)
       at org.apache.nifi.controller.repository.StandardProcessSession.commit(StandardProcessSession.java:318)
       at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:28)
       at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1118)
       at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
       at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
       at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)
1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
20 REPLIES 20

avatar

@dhieru singh

I was able to replicate the error when I tried to write 0 byte files.

Use the GenerateFlowFile processor to create ten 100 byte files, instead of zero byte files

avatar
Expert Contributor
@Wynner

I really appreciate your help.

I tried using the GenerateFlowFileProcessor to create non zero bytes files, started it, it was successful hence it got queued on success. However it is the still same news.

Dhieru

avatar
@dhieru singh

Did you clear all of the zero byte files from queue on the connection first?

avatar
Expert Contributor

@Wynner

Yes I did empty the queue.

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
@dhieru singh

Okay, so you are now getting a different error. Try setting the run schedule to 30 seconds so you don't generate so many flow files and fill up the queue.

It is probably trying to write all of the files at once and hitting the timeout.

Clear the queue, set the run schedule to 30 seconds on the GenerateFlowFile processor and then turn on the PublishKafka processor.

avatar
Expert Contributor

@Wynner Thanks The generate flow file processor works however there is error on the PublishKafka side says Timeout exception,

34388-kakfa2.png

34387-generateflowfileprop.png

avatar
Expert Contributor

@Wynner

Thanks for the help it is hihgly appreciated

avatar

@dhieru singh

Are you able to Publish messages to the Kafka broker now?

avatar
Expert Contributor

yes @Wynner

I created a new topic and published it to that, it is working, no other changes except for creating a new topic on kafka broker. I generated a 100 B 10 files and published it, it worked like charm. Now I will move on from this PoC to a more solid use case. Thanks for you help and patience Highly appreciated.