Let’s watch the next video and look at a simple example of Kafka Streams using the word count application.
In the video above, Vishwa spoke about the Java code responsible for executing the word count application.
- First, we read the words present in an input Kafka topic, converted all the words into lowercase and then split the entire text on the occurrence of space.
- Next, we grouped the words that were the same and calculated its count. After getting the count of all the words in the Kafka topic, we pushed it to the output Kafka topic.
- This is the main logic that we applied to get the count of the words in a topic and pushed the word and its corresponding count to another Kafka topic.
Let’s hear from Vishwa as he quickly summarises the different methods and the tasks they perform.
The code that you looked at in the previous video is attached below for your reference.
In the video above, Vishwa summarises the entire program and explained the different methods present in this program. Now we need to run this program and check whether or not it is performing as expected. In the next segment, you will learn how to run the program.
Additional Reading
Word Count Code – This is the code which you looked at in this segment.
Word Count Code – This is the official documentation of the word count demo application. It also lists the steps to run this code. You will learn how to run it in the next segment.
Report an error