@Muhammad waqas
In reality you don't communication channel between NiFi and Kafka. It's your PublishKafka and ConsumeKafka processors that connect behind the scenes!!!
First I see your processors are not started. Can you start them in this sequences
- GenerateFlowFile
- PublishKafka
- LogAttribute
- ConsumeKafka
That flow files should work you need to do the following
Create a Kafka topic Need to create a Kafka topic eg
./bin/kafka-topics.sh kafka-topic --create --topic Mytest --zookeeper 127.0.0.1:2181 --partitions 3 replication-factor 1
In the PublishKafka configure the processor
Property value
Kafka brokers 127.0.0.1:9092
Security protocol PLAINTEXT
Topic Name mytest
Delivery Guarantee Guarantee Replicated Delivery
- Start the GeneraFlowFile processor
- Start the PublishKafka processor
Configure and Start a kafka consumer
./bin/kafka-console-consumer.sh console-consumer --topic Mytest bootstrap-server 127.0.0.1:9092
log attribute settings
- Check Automatically Terminate Relationships
Apply and start the processor
Configure and Start a Kafka consumer
In the properties tab
Property Value
Kafka Brokers 127.0.0.1:9092
Security Protocol PLAINTEXZT Topic Name
Mytest Group ID Test (can be anything)Offset
Reset latest or earliest
Save by clicking apply
Now all your processor should show sgreen et voila !!