I'm a beginner with Apache NiFi, but until now All the tutorial that I read speak about the integration of kafka with Nifi. how it kafka is the complementary of Nifi? why we don't use Nifi directly to pusblish our message without the using of kafka?
Note: All tutorial that I seen does not speak about this point.
NiFi and Kafka complements in the sense that NiFi is not a messaging queue like Apache Kafka. On the contrary, Apache NiFi is a data-flow management aka data logistics tool.
Let's assume this scenario: You have messages (in JSON format) getting streamed through Kafka and you want to validate the messages to check if the message has all the fields and if they are valid, you want the messages to land in HBase.
Here NiFi can help you with the following approach:
ConsumeKafka
processors which you can configure with your Kafka broker and the group name.ValidateRecord
to check if the received messages are all validPutHBaseRecord
Summarizing, NiFi basically prevents you from writing a lot of boilerplate code. In this case, a custom logic to do schema validation and writing to HBase.