-
Download the Kafka 0.10.0.0 binary
cd kafka_2.11-0.10.0.0 -
Run the zookeeper & kafka server
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties -
Create the topics manually using the kafka cli
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic odd
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic evenCheck if the topics are created
bin/kafka-topics.sh --list --zookeeper localhost:2181 -
Clone this repo
git clone https://github.com/thejasbabu/kafka-example.git -
Compile and package the project
mvn clean compile package -
Run the Consumer,Producer and Stream program
java -jar ./target/1-1.0-SNAPSHOT-jar-with-dependencies.jar "consumer"
java -jar ./target/1-1.0-SNAPSHOT-jar-with-dependencies.jar "producer"
java -jar ./target/1-1.0-SNAPSHOT-jar-with-dependencies.jar "stream"
forked from thejasbabu/kafka-example
-
Notifications
You must be signed in to change notification settings - Fork 0
labtests/kafka-example
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A simple Kafka Consumer and Producer example
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Java 100.0%