Check out how to install kafka on windows and Ubuntu or Mac
Index
- Command line Kafka Publishing and Consuming test Data
- Create a kafka producer topic using springboot and Gradle build application.
kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 3 --partitions 6 --topic inv_purchases_data
kafka-console-producer --broker-list localhost:9092 --topic inv_purchases_data
kafka-console-consumer --bootstrap-server localhost:9092 --topic inv_purchases_data --from-beginning
done!
git clone https://github.com/sada498/Kafka.git
Note: I am using Ubuntu to test code and running kafka. To know how to start kafka on windows. click here
./bin/zookeeper-server-start.sh ./config/zookeeper.properties
./bin/kafka-server-start.sh ./config/server.properties
cd Kafka/kafka-simple-producer
./gradlew run
Note: If have problem with ./gradlew: command not found
chmod +x gradlew
./gradlew run
kafka-topics --list --zookeeper localhost:2181
kafka-console-consumer --bootstrap-server localhost:9092 --topic AU-weather-report --from-beginning
Done :)