Kafka for dummies - FreeBSD edition

It was not obvious to me how to get kafka going.

pkg install kafka zookeeper
service zookeeper onestart
service kafka onestart


That's the bare minimum to start playing around.

alias kafka-console-producer /usr/local/share/java/kafka/bin/kafka-console-producer.sh --bootstrap-server localhost:9092
alias kafka-console-consumer /usr/local/share/java/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092
alias kafka-topics /usr/local/share/java/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092
 
sh:
kafka-topics --create --topic lostandfound
kafka-topics --describe --topic lostandfound
kafka-console-producer --topic lostandfound
(wait for prompt and type some text)
kafka-topics --describe --topic lostandfound
kafka-console-consumer --topic lostandfound --from-beginning
 
Back
Top