- University Admissions
- Subject
- Business Tutoring
- Management
- Computer Science / it
- Mathematics
- Finance
- Social Sciences
- Healthcare and Nutrition
- Science
- Humanities
- Biotechnology
- Law
- Communication
- Services
- Editing & Proofreading
- Blog
Learn how to set up Kafka and what it does as a message broker.
Purpose
Experience how streaming data can be processed.
Task
Set up Kafka locally and stream messages from producer to consumer.
Time
This task is a Credit task and only mandatory if you would like to aim higher than a Pass grade. It should be submitted to Canvas for feedback. It should be discussed and signed off in tutorial 6 or 7.
This task should take no more than 2 hours to complete.
Resources
Feedback
Demonstrate your solution to the tutorial instructor.
Next
Get started on module 7.
Credit Task 6 — Submission Details and Assessment Criteria
For this task you only have to upload the screenshots of the producer and consumer consoles (terminals) when you have tested your setup. Your tutor will give online feedback and discuss the tasks with you in the lab when they are complete
Set up a Kafka cluster on your local PC/Mac and configure it to use it with a wordcount application:
Things to watch out for:
If you are using a Mac, the instructions in the tutorial apply. If you are using windows, you have to call \bin\windows\<somescript>.bat instead of
\bin\<somescript>.sh
I had to change the kafka-run-class.sh and kafka-run-class.bat files, because the directory to the kafka-streams-examples-2.3.0.jar file was wrong. If you are downloading directly, you have to adjust this.
The .properties files in the config directory have the Linux file separator / . If you have downloaded the .zip file from Canvas, I have changed the log
directory’s separators to \ in server.properties. Change back if you are using a Mac.
The exercise makes you open many command windows (or terminals). I suggest use one terminal to run all commands, because it preserves a history of commands and you can go back and change commands (using the ‘up’ button) without having to type or paste them again.
On a windows machine, you simply start the line with ‘start’, e.g. start bin\windows\kafka-server-start.bat config\server.properties
On a Mac, you add & to the end to start running the program in the background: bin/kafka-server.sh config/server.properties
25k+
Sessions Done
4.9/5
Student Rating
600+
Expert Tutors
Concept Clarity
Personalized Plan
Affordable Rates
Flexible Schedule
Results Driven
24/7 Support